Page 1 of 1

converting xcf > png: alpha channel lost

Posted: 2008-01-12T15:58:08-07:00
by vico
I dont know if this is a bug, converting an xcf with transparency give me a png with black background.

The command i tried was:
"convert test.xcf test.png"
and
"convert -flatten test.xcf test.png"

Im i doing something wrong??
It seems that imagemagick don't recognize the alpha channel of the xcf format.
With "identify -verbose test.xcf" it only reports RGB channels, and if i save the image as png from gimp, the same command reports RGBA.

Any idea on how to get transparency from xcf?

thanks

vico

(sorry for mi bad english)

Re: converting xcf > png: alpha channel lost

Posted: 2008-01-21T20:03:55-07:00
by vico
anyone??

Re: converting xcf > png: alpha channel lost

Posted: 2008-01-30T18:59:21-07:00
by anthony
-flatten not only merged multiple layers together but also uses a starting canvas of the current -background color setting.

If unset that setting comes from the image file, if that format does not have such a setting or no image has been read in, it is set to white.

If you want it transparent, set it to 'none' or 'transparent'.

See Im examples, Layering, Flatten
http://imagemagick.org/Usage/layers/#flatten

Re: converting xcf > png: alpha channel lost

Posted: 2010-02-19T09:15:39-07:00
by angelaf
Any other thoughts on this issue? -background transparent did not work.
Specifically, I'm having problems maintaining the transparent Alpha channel using a convert command from .sgi to .png

Help appreciated! :)

Re: converting xcf > png: alpha channel lost

Posted: 2010-02-19T09:37:15-07:00
by snibgo
Can you post a link to the xcf file so we can try it?

Re: converting xcf > png: alpha channel lost

Posted: 2010-02-19T10:21:45-07:00
by angelaf
http://www.prism.gatech.edu/~afritz3/dr ... _RADAR.sgi

As I said, it's an SGI file. Apologies, not sure if that's really in the same category as an xcf...

Re: converting xcf > png: alpha channel lost

Posted: 2010-02-19T10:56:42-07:00
by fmw42
I am no expert on sgi files, but when downloading or trying to view it, it appears to be a txt file. So I changed the type to .sgi and got this

identify -verbose BANNER_HD_RADAR.sgi
identify: improper image header `BANNER_HD_RADAR.sgi' @ error/sgi.c/ReadSGIImage/347.

Re: converting xcf > png: alpha channel lost

Posted: 2010-02-19T11:01:41-07:00
by magick
We have a patch in ImageMagick 6.5.9-9 Beta to fix this problem. The patched distribution will be available sometime tomorrow.

Re: converting xcf > png: alpha channel lost

Posted: 2010-02-21T01:16:12-07:00
by angelaf
Thank you!

Re: converting xcf > png: alpha channel lost

Posted: 2010-02-21T01:16:45-07:00
by angelaf
fmw42 wrote:I am no expert on sgi files, but when downloading or trying to view it, it appears to be a txt file. So I changed the type to .sgi and got this

identify -verbose BANNER_HD_RADAR.sgi
identify: improper image header `BANNER_HD_RADAR.sgi' @ error/sgi.c/ReadSGIImage/347.
I apologize, I should have known that posting it to web wouldn't have worked.