Page 1 of 1

question about zooming gif with MagickWand API

Posted: 2013-11-06T23:50:45-07:00
by zhcn381
hi maigck,

I have a question about zooming gif with MagickWand API.

I have a gif.
I want to do resize on its first frame.
I want the output is jpeg.
So I do these:

Code: Select all

MagickReadImageBlob()
MagickResetIterator()
MagickResizeImage()
MagickSetImageFormat("jpeg")
MagickGetImagesBlob()
Then the program core dumped.
Then I read some code and I noticed that MagickResizeImage() will call ReplaceImageInList(). So the output image will still have multiple frames. But the first frame's magick is JPEG and others are still GIF. And the adjoin flag is true. So it will core?
Temporarily I use MagickGetImageBlob() instead of MagickGetImagesBlob() to work around this. Is there any other way to achieve this? Pls help me out. Thx.