Dear Everybody
I had some trouble when I load a Indexed-Color png image with transparency channel and then resize it.
the transparent info of result had been lost. I search on the google and also the borad here.
But I can not find any useful information. can anybody help me?
My ImageMagick Version is 8.3.1.
best regards,
WF Tao
transparency info losted when resize Indexed-Color png
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: transparency info losted when resize Indexed-Color png
I think you need to post a link to your input png and show us your exact command.
I have no trouble with the following in IM 6.8.3.10 Q16 Mac OSX Snow Leopard
convert logo: -transparent white logot.png
It is of type palettealpha
When I resize it in half using -resize, it is converted to truecoloralpha due to the alpha channel being converted from binary to 8-bit. But it still has its transparency.
To keep it palettealpha, you would need to resize using -sample if minifying.
If enlarging, I believe you could use -sample or -scale.
I have no trouble with the following in IM 6.8.3.10 Q16 Mac OSX Snow Leopard
convert logo: -transparent white logot.png
It is of type palettealpha
When I resize it in half using -resize, it is converted to truecoloralpha due to the alpha channel being converted from binary to 8-bit. But it still has its transparency.
To keep it palettealpha, you would need to resize using -sample if minifying.
If enlarging, I believe you could use -sample or -scale.