convert produces images of the same type as the input and not the type of the output file
convert produces images of the same type as the input and not the type of the output file
There is a weird behavior I encountered with splitting a GIF into PNG frames.
Using an older version of ImageMagick (6.5.4-7), the command 'convert test.gif gif_frame_%d.png' produces correct files (with 'Format: PNG' when using 'identify -verbose gif_frame_0.png'), while using a newer version (6.8.6-8) with the same command produces files that are 'Format: GIF'.
Is there a parameter I'm missing for the new version, or could it be just a configure variable?
Using an older version of ImageMagick (6.5.4-7), the command 'convert test.gif gif_frame_%d.png' produces correct files (with 'Format: PNG' when using 'identify -verbose gif_frame_0.png'), while using a newer version (6.8.6-8) with the same command produces files that are 'Format: GIF'.
Is there a parameter I'm missing for the new version, or could it be just a configure variable?
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: convert produces images of the same type as the input and not the type of the output file
Try IM 6.9.0.3 As I recall there was at least one version of IM that had that problem and was quickly fixed. If that does not work, then post your gif image so others can test it. You can upload to some place like dropbox.com and put the URL here. Also post the results of convert -version to see that you have the needed delegates. Also perhaps your libpng is too old or has a bug.
Re: convert produces images of the same type as the input and not the type of the output file
broken convert -version:fmw42 wrote:Try IM 6.9.0.3 As I recall there was at least one version of IM that had that problem and was quickly fixed. If that does not work, then post your gif image so others can test it. You can upload to some place like dropbox.com and put the URL here. Also post the results of convert -version to see that you have the needed delegates. Also perhaps your libpng is too old or has a bug.
Code: Select all
Version: ImageMagick 6.8.6-8 2014-12-27 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2013 ImageMagick Studio LLC
Features: DPC Modules
Delegates: bzlib freetype jng jpeg png ps xml zlib
Code: Select all
Version: ImageMagick 6.5.4-7 2012-05-07 Q16 OpenMP http://www.imagemagick.org
Copyright: Copyright (C) 1999-2009 ImageMagick Studio LLC
Re: convert produces images of the same type as the input and not the type of the output file
I've ran it with the newest version:
And it's also creating files with 'Format: GIF' 
Code: Select all
Version: ImageMagick 6.9.0-1 Q16 x86_64 2014-11-24 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2014 ImageMagick Studio LLC
Features: DPC
Delegates (built-in): bzlib xml zlib

- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: convert produces images of the same type as the input and not the type of the output file
6.9.0.1 is a known bogus version with that exact issue as I mentioned above. The latest version is 6.9.0.3. Post your image somewhere like dropbox.com and put the URL here. Then we can test and see if we can duplicate.
Re: convert produces images of the same type as the input and not the type of the output file
oh I seefmw42 wrote:6.9.0.1 is a known bogus version with that exact issue as I mentioned above. The latest version is 6.9.0.3. Post your image somewhere like dropbox.com and put the URL here. Then we can test and see if we can duplicate.

The image is here: https://www.dropbox.com/s/nsxujjrhwqo7862/test.gif?dl=0
But it happens for any GIF that I tried so far. Thanks!
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: convert produces images of the same type as the input and not the type of the output file
This works fine for me on IM 6.9.0.3 Q16 Mac OSX. All gif frames are converted to png
Do you have the libpng delegate and is it current?
Code: Select all
convert test.gif new/test_%d.png
cd new
identify test_0.png
test_0.png PNG 500x250 500x250+0+0 8-bit sRGB 138c 25.4KB 0.000u 0:00.000
Re: convert produces images of the same type as the input and not the type of the output file
Is there an easy way to check? It's the same machine that I'm executing the other command on.
I just tried with 6.9.0-0 on my local machine and it's correct as well - PNG format.
Could this issue also be in 6.8.6-8?
My issue is with that version and it's on a server that I don't have direct access to upgrading software on, but I'll try to push for that. Would be nice to verify that it's an issue with 6.8.6-8 and not just another bug/mis-configuration that will be there after the upgrade, though.
I just tried with 6.9.0-0 on my local machine and it's correct as well - PNG format.
Could this issue also be in 6.8.6-8?
My issue is with that version and it's on a server that I don't have direct access to upgrading software on, but I'll try to push for that. Would be nice to verify that it's an issue with 6.8.6-8 and not just another bug/mis-configuration that will be there after the upgrade, though.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: convert produces images of the same type as the input and not the type of the output file
Perhaps you are missing some other needed delegate, though I have no idea what. Or your libpng delegate is too old or corrupt. Or the IM 6.8.6.8 is corrupt. I am trying to recompile 6.8.6.8 to test. Let you know what happens shortly.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: convert produces images of the same type as the input and not the type of the output file
Works fine for me with IM 6.8.6.8
Code: Select all
im6868 convert -version
Version: ImageMagick 6.8.6-8 2015-01-15 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2013 ImageMagick Studio LLC
Features: DPC Modules
Delegates: bzlib mpeg fftw fontconfig freetype gslib jbig jng jp2 jpeg lcms lqr lzma openexr png ps rsvg tiff webp x xml zlib
im6868 convert test.gif new/test_%d.png
cd new
identify test_0.png
test_0.png PNG 500x250 500x250+0+0 8-bit sRGB 138c 25.4KB 0.000u 0:00.000
Re: convert produces images of the same type as the input and not the type of the output file
thanks for checking! that means I'm back to square one.
So my version of 6.8.6-8 reports this:
So the delegate is there. Could it be anything else? Could I figure out which libpng is ImageMagick using? Assuming I might have more than one, because it does work on the same machine with 6.5.4-7.
So my version of 6.8.6-8 reports this:
Code: Select all
Version: ImageMagick 6.8.6-8 2014-12-27 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2013 ImageMagick Studio LLC
Features: DPC Modules
Delegates: bzlib freetype jng jpeg png ps xml zlib
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: convert produces images of the same type as the input and not the type of the output file
What do you get for delegates from 6.5.4.7.
Try
convert -list configure
and look at the line starting DELEGATES
Try
convert -list configure
and look at the line starting DELEGATES
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: convert produces images of the same type as the input and not the type of the output file
Try
convert -list format
It might tell you the version as per this on mine
PNG* PNG rw- Portable Network Graphics (libpng 1.6.12)
See http://www.libpng.org/ for details about the PNG format.
PNG00* PNG rw- PNG inheriting bit-depth and color-type from original
PNG24* PNG rw- opaque or binary transparent 24-bit RGB (zlib 1.2.
PNG32* PNG rw- opaque or transparent 32-bit RGBA
PNG48* PNG rw- opaque or binary transparent 48-bit RGB
PNG64* PNG rw- opaque or transparent 64-bit RGBA
PNG8* PNG rw- 8-bit indexed with optional binary transparency
Note PNG24 seems to need zlib.
convert -list format
It might tell you the version as per this on mine
PNG* PNG rw- Portable Network Graphics (libpng 1.6.12)
See http://www.libpng.org/ for details about the PNG format.
PNG00* PNG rw- PNG inheriting bit-depth and color-type from original
PNG24* PNG rw- opaque or binary transparent 24-bit RGB (zlib 1.2.

PNG32* PNG rw- opaque or transparent 32-bit RGBA
PNG48* PNG rw- opaque or binary transparent 48-bit RGB
PNG64* PNG rw- opaque or transparent 64-bit RGBA
PNG8* PNG rw- 8-bit indexed with optional binary transparency
Note PNG24 seems to need zlib.
Re: convert produces images of the same type as the input and not the type of the output file
oh wow, this is weird: convert -list configure reports this delegates for the working version:
and this delegates for the broken version:
"convert -list format" shows PNG formats for the working version, but none for the broken version. What could cause that?
(btw, thanks SO much for the help!)
Code: Select all
DELEGATES bzlib fontconfig freetype gs jpeg jng jp2 lcms png rsvg tiff x11 xml wmf zlib
Code: Select all
DELEGATES bzlib freetype jng jpeg png ps xml zlib
(btw, thanks SO much for the help!)
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: convert produces images of the same type as the input and not the type of the output file
PNG seems to be in both systems. However, this list does not always mean that the delegate is really there and working.and this delegates for the broken version:
CODE: SELECT ALL
DELEGATES bzlib freetype jng jpeg png ps xml zlib
You may need to check the versions of each using
convert -list format
If PNG is not listed in the bad IM version, then it was not truly installed properly. Still it could be there an corrupt. So it might need reinstalling and if so, try to upgrade it.