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)
converting xcf > png: alpha channel lost
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: converting xcf > png: alpha channel lost
-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
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
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
Re: converting xcf > png: alpha channel lost
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!
Specifically, I'm having problems maintaining the transparent Alpha channel using a convert command from .sgi to .png
Help appreciated!

-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: converting xcf > png: alpha channel lost
Can you post a link to the xcf file so we can try it?
snibgo's IM pages: im.snibgo.com
Re: converting xcf > png: alpha channel lost
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...
As I said, it's an SGI file. Apologies, not sure if that's really in the same category as an xcf...
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: converting xcf > png: alpha channel lost
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.
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
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
Thank you!
Last edited by angelaf on 2010-02-21T01:34:27-07:00, edited 1 time in total.
Re: converting xcf > png: alpha channel lost
I apologize, I should have known that posting it to web wouldn't have worked.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.