get rid of transparency of selected part of png using imagemagic

Posted on


I have this png image with transparency

I want to get rid of transparency using imagemagick, but only of the selected part and not the whole image.

Is it possible?


What I would suggest you to do is to cut down the portion which I don’t want to be transparent and then use :

 convert image.png -transparent white result.png

or if not perfectly white, then try

 convert image.png -fuzz XX% -transparent white result.png

where the smaller the %, the closer to true white or conversely, the larger the %, the more variation from white is allowed to become transparent.
For more details check this and this.
After applying them I would superimpose that image on the original one. However you can use Geometry if you want to . But I would prefer the first way only.

Leave a Reply

Your email address will not be published. Required fields are marked *