Page 1 of 1

Transparent color: black

Posted: 2010-02-18T04:35:16-07:00
by youds
Hi

The "identify -verbose" command is telling me that the transparent colour is black.
How do I specify the transparent colour to be white when using the convert command?

Thanks

Re: Transparent color: black

Posted: 2010-02-18T05:11:15-07:00
by snibgo
Is this for 256-pallette Gif?

The "-transparent-color" option is probably what you need.

Re: Transparent color: black

Posted: 2010-02-18T05:33:26-07:00
by youds
Thanks for the reply.

I'm doing:

Code: Select all

convert -transparent-color #FFFFFFFF original_newsletter.4b7d31b7d810c.png original_newsletter.4b7d31b7d810c.jpg
But I keep getting back the help message.

Can you help?

Re: Transparent color: black

Posted: 2010-02-18T07:07:05-07:00
by snibgo
Can you post a link to your image?

Re: Transparent color: black

Posted: 2010-02-18T07:10:21-07:00
by youds
Sure, no problem.
http://public.me.com/craigfairhurst saved with name "newsletter.png"

Re: Transparent color: black

Posted: 2010-02-18T08:02:49-07:00
by snibgo
"identify verbose" tells me the image has a conventional alpha channel. If you effectively want to place this image in front of a white background, so the white shows through the transparent areas, try:

convert newsletter.png -background white -flatten newsWhite.png

[Edited: added "-" in front of "flatten"]

Re: Transparent color: black

Posted: 2010-02-18T08:49:32-07:00
by youds
Thanks. Why the -flatten option?

Re: Transparent color: black

Posted: 2010-02-18T08:57:31-07:00
by snibgo
"Flatten" is what does the work. The "-background" just declares the colour that will be used by any operation that needs a background.

Re: Transparent color: black

Posted: 2010-02-18T08:59:23-07:00
by youds
What about PDF / EPS files, text will still be editable and the document will contain layers?

Re: Transparent color: black

Posted: 2010-02-18T09:09:04-07:00
by snibgo
Editable only as pixels. ImageMagick is a raster processor -- it deals with pixels.

Re: Transparent color: black

Posted: 2010-12-31T13:27:37-07:00
by synexis
I was having this issue with 6.6.5-10. I downgraded to version 6.6.4-10 (I believe with the same configuration options), and the problem went away.
This was after a similar issue with 6.6.6-8, where black values would turn transparent with png output.
Hope that helps someone. Cheers.

Re: Transparent color: black

Posted: 2010-12-31T16:00:52-07:00
by fmw42
synexis wrote:I was having this issue with 6.6.5-10. I downgraded to version 6.6.4-10 (I believe with the same configuration options), and the problem went away.
This was after a similar issue with 6.6.6-8, where black values would turn transparent with png output.
Hope that helps someone. Cheers.

This has already been reported and is being worked on. See bugs at viewtopic.php?f=3&t=17748

Re: Transparent color: black

Posted: 2011-01-01T13:35:23-07:00
by youds
Thanks