daily pastebin goal
37%
SHARE
TWEET

Untitled

a guest Oct 20th, 2018 81 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
  1. {-# LANGUAGE UnicodeSyntax #-}
  2. module Main where
  3.  
  4. import Control.Applicative ((<$>))
  5. import Data.List (foldr1)
  6. import Graphics.GD (copyRegion, loadPngFile, newImage, savePngFile)
  7. import System.Directory (getCurrentDirectory, getDirectoryContents)
  8. import System.FilePath ((</>))
  9.  
  10. main ∷ IO ()
  11. main = do
  12.   image_files ← map ("img" </>) . filter (`notElem` [".",".."]) <$> getDirectoryContents "img"
  13.   images ← mapM loadPngFile image_files
  14.   new_image ← newImage (1366 * length images, 768)
  15.   mapM (\(i,s) → copyRegion (0,0) (1366,768) s (1366 * i,0) new_image) $ zip [0..] images
  16.   savePngFile "POLOTNISHE.png" new_image
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top