Gifcurry- GIF creation utility.

Safe HaskellSafe



Produces GIFs using FFmpeg and ImageMagick. The main function is gif.



gif :: GifParams -> IO (Either IOError String) Source #

Inputs GifParams and outputs either an IO IOError or IO String.

   import qualified Gifcurry (gif, GifParams(..), defaultGifParams, gifParamsValid)
   main :: IO ()
   main = do
     let params = Gifcurry.defaultGifParams { Gifcurry.inputFile = "./", Gifcurry.outputFile = "./out.gif" }
     valid <- Gifcurry.gifParamsValid params
     if valid
       then do
         result <- Gifcurry.gif params
         print result
       else return ()

defaultFontChoice :: String Source #

Returns the default font choice used if no font choice is specified.

gifParamsValid :: GifParams -> IO Bool Source #

Outputs True or False if the parameters in the GifParams record are valid.

versionNumber :: String Source #

The version number.

getVideoDurationInSeconds :: GifParams -> IO (Maybe Float) Source #

Returns the duration of the video in seconds if successful.

   import qualified Gifcurry (getVideoDurationInSeconds)
   -- ...
   let params = Gifcurry.defaultGifParams { Gifcurry.inputFile = "./" }
   maybeDuration <- Gifcurry.getVideoDurationInSeconds params
   let duration = case maybeDuration of
                     Nothing    -> 0.0
                     Just float -> float

getOutputFileWithExtension :: GifParams -> String Source #

Adds the proper file extension to the outputFile depending on saveAsVideo.

getVideoWidthAndHeight :: GifParams -> IO (Maybe (Float, Float)) Source #

Returns the width and height of the video if successful. If the width and/or height of the video is <= 0, it will return nothing.

findOrCreateTemporaryDirectory :: IO FilePath Source #

Finds or creates the temporary directory for Gifcurry. This directory is used for storing temporary frames.