module Main where import CV.Image import CV.Sampling -- | Output: -- splitLena.jpg - Lena image split to tiles with few pixels of black between tiles -- splitLena2.jpg - Lena image split to tiles and joined safely back to original main = do Just x <- loadImage "smallLena.jpg" let pieces = getTiles (60,30) x piecesWithCoordinates = getTilesC (30,60) x joined = montage (6,3) 5 pieces blitted = blitM (205,205) piecesWithCoordinates saveImage "splitLena.jpg" joined saveImage "splitLena2.jpg" blitted