GIF to PNG conversion gives wrong color

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
mco
Posts: 3
Joined: 2013-02-01T06:29:53-07:00
Authentication code: 6789

GIF to PNG conversion gives wrong color

Post 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.
User avatar
dlemstra
Posts: 1570
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: GIF to PNG conversion gives wrong color

Post 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.
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate
mco
Posts: 3
Joined: 2013-02-01T06:29:53-07:00
Authentication code: 6789

Re: GIF to PNG conversion gives wrong color

Post 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
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: GIF to PNG conversion gives wrong color

Post 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
snibgo's IM pages: im.snibgo.com
mco
Posts: 3
Joined: 2013-02-01T06:29:53-07:00
Authentication code: 6789

Re: GIF to PNG conversion gives wrong color

Post by mco »

Aren't there binaries like ffmpeg2theora for ImageMagick's convert?
Post Reply