Page 1 of 1

transparency info losted when resize Indexed-Color png

Posted: 2013-03-18T05:37:19-07:00
by twfjqm
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

Re: transparency info losted when resize Indexed-Color png

Posted: 2013-03-18T10:19:06-07:00
by fmw42
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.