Page 1 of 1
Gif manipulation side effect?
Posted: 2013-03-22T04:23:15-07:00
by redroom
Hello,
I tried to convert that image to png :
I used :
convert mn.gif test.png
The image is duplicated 4 times in some kind of image stack during the process...
The results shows me 4 squeezed maps of france in the same image size...
I'm using the latest imagemagick on windows XP.
If I'm converting the image from mn.gif to mn1.gif in paint .net and then do the convert, it works properly.
So I guess the original format has some strange settings that makes the convert fail, and that paint.net just ignores...
Should I set some additional parameters to avoid that ?
Thanks for ur help.
Re: Gif manipulation side effect?
Posted: 2013-03-22T04:44:09-07:00
by snibgo
For me, IM v6.8.3 on Windows 7, it converts with no problem.
Re: Gif manipulation side effect?
Posted: 2013-03-22T05:11:32-07:00
by glennrp
redroom wrote:
Should I set some additional parameters to avoid that ?
Thanks for ur help.
What are you using to view the image? The bug may be in the
viewer. The image has only 3 colors and has bit_depth=2 in both
the input GIF and output PNG. You can force the PNG to have
bit_depth=8 by running
Re: Gif manipulation side effect?
Posted: 2013-03-22T06:30:28-07:00
by redroom
thanks, I'm viewing it with FF and paint.net
Here is what I got as result :
and I'm using 6.8.3-10, more or less like snibgo, it seems.
Re: Gif manipulation side effect?
Posted: 2013-03-23T09:34:33-07:00
by redroom
Hello,
I tried it today with a fresh install : X64 version on Win 7... same result...
Or there is a bug in the current version of IM, or there is something special about that image ?
the png8: flag doesn't change result, any ideas ?
thanks.
Re: Gif manipulation side effect?
Posted: 2013-03-23T21:51:37-07:00
by glennrp
redroom wrote:thanks, I'm viewing it with FF and paint.net
... and I'm using 6.8.3-10, more or less like snibgo, it seems.
That looks like an interlaced image being rendered incorrectly. Your source image mn.gif
is in fact GIF interlaced, according to "identify -verbose". When I use IM-6.8.3-10 (on Linux) to
convert mn.gif to mn.png, the resulting PNG is not interlaced.
Re: Gif manipulation side effect?
Posted: 2013-03-29T09:53:24-07:00
by jhuckaby
I can confirm this is happening for me as well, using any number of different interlaced GIF89a images. It only seems to happen if the GIF is interlaced. I am using ImageMagick 6.8.3-10 (Q8) on CentOS 6.2 (64-bit).
To reproduce, download one of the following interlaced GIF 89a images:
https://dl.dropbox.com/u/4585115/89a-interlaced.gif
https://dl.dropbox.com/u/4585115/interlaced.gif
And simply convert the format:
convert 89a-interlaced.gif test.png
convert 89a-interlaced.gif test.jpg
convert interlaced.gif test2.png
convert interlaced.gif test2.jpg
And view the resulting image in any viewer app. I have samples of the outputs here:
https://dl.dropbox.com/u/4585115/im-test.jpg
https://dl.dropbox.com/u/4585115/im-test.png
https://dl.dropbox.com/u/4585115/im-test2.jpg
https://dl.dropbox.com/u/4585115/im-test2.png
As you can see, the images do not look correct. Note that these tests work perfectly on previous versions of ImageMagick (I have tested on 6.3.8 and 6.2.4). I have being using interlaced GIF89a images for years, and have been using "interlaced.gif" as a test image without issue until this version of ImageMagick.
One final note. It seems that the problem is in the loading of the GIF, not the conversion. If I load an interlaced GIF89a and simply composite it on top of a blank canvas, the final image still shows the problem on IM 6.8.3-10.
- Joe
Re: Gif manipulation side effect?
Posted: 2013-03-29T10:20:55-07:00
by jhuckaby
Addendum: I just tried with the latest build (ImageMagick 6.8.4-4 as of March 29, 2013) and the bug still exists.
Re: Gif manipulation side effect?
Posted: 2013-03-29T10:38:38-07:00
by jhuckaby
Addendum 2: I cannot reproduce the bug using ImageMagick 6.8.2-10. So it was introduced sometime between 6.8.2-10 (Feb 12) and 6.8.3-10 (March 18).
Re: Gif manipulation side effect?
Posted: 2013-03-29T10:44:34-07:00
by fmw42
I can confirm your result using IM 6.8.4.4 Q16 Mac OSX Snow Leopard.
Perhaps glennrp (the png expert) can shed more light.
Re: Gif manipulation side effect?
Posted: 2013-03-30T14:39:49-07:00
by glennrp
The bug (in the gif decoder) has been fixed by "magick" as of IM-6.8.4-5.
Re: Gif manipulation side effect?
Posted: 2013-04-01T09:51:15-07:00
by jhuckaby
Confirmed fixed in 6.8.4-5! Thanks so much!