Hi.
I have an image with an alpha channel defining the mask.
Using
convert.exe file.psd -alpha on file.tga
will create a tga file that has the correct alpha mask set, but has the color values outside of the mask turned to black.
Is there any way to avoid this?
Working with alpha turns color pixels black outside of mask
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Working with alpha turns color pixels black outside of mask
Depends on how the mask was defined in the PSD file.
PSD files can be a real pain to use as they are not a 'typical' image format, but an image editing format.
PSD files can be a real pain to use as they are not a 'typical' image format, but an image editing format.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
Re: Working with alpha turns color pixels black outside of mask
Well, the source data is pretty simple.
If I save the file without alpha (convert file.psd -alpha off file.tga) it correctly shows all color.
If I extract the mask (convert file.psd -alpha extract file_mask.tga) it also is correct (8-bit, black where the color should not be visible and white where it should be).
I'm a bit clueless. Sadly, if this is the default behavior of ImageMagick and there is no way to change it I have to switch to another program.
If I save the file without alpha (convert file.psd -alpha off file.tga) it correctly shows all color.
If I extract the mask (convert file.psd -alpha extract file_mask.tga) it also is correct (8-bit, black where the color should not be visible and white where it should be).
I'm a bit clueless. Sadly, if this is the default behavior of ImageMagick and there is no way to change it I have to switch to another program.
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Working with alpha turns color pixels black outside of mask
Are you sure a TGA format can handle a transparency?
Try generating an image with transparency and saving it to TGA and checking the result.
Try generating an image with transparency and saving it to TGA and checking the result.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
Re: Working with alpha turns color pixels black outside of mask
Hi.
I now checked it with various file formats and all show the same behavior. Meaning in the output file all pixels of the colormap that are outside of the alpha mask are turned to black when using -alpha on.
I now checked it with various file formats and all show the same behavior. Meaning in the output file all pixels of the colormap that are outside of the alpha mask are turned to black when using -alpha on.
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Working with alpha turns color pixels black outside of mask
Can you provide us with a link to such a image (preferably PNG and not PSD), and the command that shows the transparent pixels turning black.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/