Setting transparency

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

Moderators: XnTriq, helmut, xnview

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

Setting transparency

Post by miksmith »


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!


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

Re: Setting transparency

Post by xnview »

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