如何使用任何一个字符串(io())
我正在与Haskell的Juicy Pixels库一起工作,我想制作一个gif动画,并使用 image pixelrgb8 的列表。有一个功能可以执行此操作(tringifanimation),但是它返回了我不知道如何使用的类型(ctring(io(io()))。 有人可以帮我吗?
我正在使用它的方式: tringifanimation“ test.gif” 1 loopingforever image_list
错误:与预期类型'io()'与实际类型'contere type'contery type'contrate'String(io(io())'
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您应该检查是否是
使用
i i 代码> io()操作,所以:s
一个错误,还是对i
使用You should check whether it is a
Left s
withs
an error, or aRight i
withi
anIO ()
action, so: