I'm working with Juicy Pixels library in Haskell and i want to make a GIF animation with a list of image PixelRGB8. There's a function that do that (writeGifAnimation), but it returns a type that i don't know how to use (Either String (IO())). Can anybody help me?
The way i'm using it:
writeGifAnimation "test.gif" 1 LoopingForever image_list
The error: Couldn't match expected type ‘IO ()’ with actual type ‘Either String (IO ())’
The library documentation: https://hackage.haskell.org/package/JuicyPixels-3.3.7/docs/Codec-Picture.html#v:savePngImage:~:text=the%20same%20delay.-,writeGifAnimation,-%3A%3A%20FilePath%20%2D%3E