As far as I know, there is no good image manipulation library for Haskell yet.

Better way

You can use hsmagick (bindings to libmagick) to manipulate images.

See TomMD's answer for an example.

Easy way

But if you want to do it from Haskell, this can do the trick (assuming that ImageMagick is available):

import System.Cmd (system) import System.Environment (getArgs) main = do (original:rotated:_) <- getArgs system $ "convert -rotate \"-45\" \"" ++ original ++ "\" \"" ++ rotated ++ "\""

Usage:

runghc rotate.hs original.jpg rotated45.jpg

Hard way

Or you can choose the hard way, and implement rotation algorithm yourself. To read and write almost all image formats in Haskell, you can use Codec.Image.DevIL library. If you do it, it would be kind of you to put this code on Hackage.