Setting transparency

Discussions on NConvert - the command line tool for image conversion and manipulation

Moderators: XnTriq, xnview

Post Reply
miksmith
Posts: 18
Joined: Wed Jun 17, 2009 3:04 pm

Setting transparency

Post by miksmith » Wed Dec 09, 2015 11:14 pm

Hi

I have a limited pallete PNG with a black object on whitebackground (254 254 252) which I would like to be transparent. Ive tried this command

nconvert -colors 256 -transpcolor 254 254 252 -resize 150 150 GOPR3908.png

which works in xnview (following those steps), but doesnt set the transparent colour in nconvert.

What am I doing wrong here?! Ive tried reordering the commands but that doesnt help either. Using "transparent" DOES work but the index number can change between images so it isnt ideal!

thanks

mike

User avatar
xnview
Author of XnView
Posts: 32251
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Setting transparency

Post by xnview » Thu Dec 10, 2015 3:12 pm

-transpcolor is to use with -mergealpha, there is no way in NConvert to change colormap
Pierre.

Post Reply