reanimate/examples/raster.hs
David Himmelstrup 2a65cfb012 Fix orientation of embedded images.
Former-commit-id: 3960c99008abdb2f1798747844b2177feb2221c7
2019-09-29 14:42:48 +08:00

16 lines
429 B
Haskell
Executable file

#!/usr/bin/env stack
-- stack runghc --package reanimate
module Main (main) where
import Reanimate
import Codec.Picture
main :: IO ()
main = reanimate $ mkAnimation 5 $ \t ->
mkGroup
[ mkBackground "black"
, rotate (t*360) $ scaleToWidth 6 $ embedImage img
]
where
img = generateImage pixelRenderer 255 255
pixelRenderer x y = PixelRGB8 (fromIntegral x) (fromIntegral y) 128