Page 1 of 1

GIF to PNG conversion gives wrong color

Posted: 2013-11-10T04:24:25-07:00
by mco
Image
Foo.gif

Code: Select all

$ convert Foo.gif Foo.png
Image
Foo.png

You can see that the transparency gets converted into some grey. However GIMP does the conversion just right.

Re: GIF to PNG conversion gives wrong color

Posted: 2013-11-10T04:28:47-07:00
by dlemstra
What is your ImageMagick version? I just tried to convert your image with 6.8.7-6 Beta and this creates a png with a transparent background.

Re: GIF to PNG conversion gives wrong color

Posted: 2013-11-10T05:29:38-07:00
by mco
ImageMagick 6.7.8-9 2013-03-10 on fedora
Though, I can not test with the later version because I am unable to install or build the binary or source code.
$ make
[...]
magick/.libs/libMagickCore-6.Q16.so: undefined reference to `jpeg_default_qtables'
collect2: error: ld returned 1 exit status
$ rpm -Uvh ImageMagick-6.8.7-5.i386.rpm error: Failed dependencies:
libgs.so.8 is needed by ImageMagick-6.8.7-5.i386
libltdl.so.3 is needed by ImageMagick-6.8.7-5.i386
liblzma.so.0 is needed by ImageMagick-6.8.7-5.i386
libtiff.so.3 is needed by ImageMagick-6.8.7-5.i386

Re: GIF to PNG conversion gives wrong color

Posted: 2013-11-10T09:22:34-07:00
by snibgo
The closest version I have is v6.7.9, and this gives the grey background. If I do ...

Code: Select all

identify -verbose apybd2ie.gif
... and search the output for "Matte" I find "Matte color: grey74". So I can convert that colour to transparent:

Code: Select all

convert apybd2ie.gif -transparent grey74 a.png

Re: GIF to PNG conversion gives wrong color

Posted: 2013-11-13T08:07:43-07:00
by mco
Aren't there binaries like ffmpeg2theora for ImageMagick's convert?