Transparent image loose color data?

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
Pipen

Transparent image loose color data?

Post by Pipen »

Dear ppl,
I spent hours and hours trying to solve this, i use 6.4.5, but i also tried with 6.5.3-9

Code: Select all

convert characters_heading.png -resize 97% -alpha off -colors 256 -alpha on -depth 8 test.png
Why do the output image loose the orange color?

Image
Image


EDIT:
running 6.4.5 on ubuntu and 6.5.3-9 on debian
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Transparent image loose color data?

Post by fmw42 »

seems to have to do with -colors 256 making your image mostly black probably because the resize converted only a few colors into a lot of nearby colors and -colors 256 chose too many near black values.

this works, but I don't know if that is what you want

convert characters_heading.png -resize 97% -alpha off -alpha on -depth 8 test.png

and this works (kind of)

convert characters_heading.png -resize 97% -alpha off -alpha on -depth 8 -colors 256 test.png
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Transparent image loose color data?

Post by anthony »

It also happens for -quantize transparent -colors 256 which should do the same thing and the -alpha off and on.

I have no idea why it is failing! I would report this as a bug of some kind!
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply