Set Background Color for PNG

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

Moderators: XnTriq, xnview

Post Reply
armin
Posts: 1
Joined: Mon Apr 19, 2004 8:54 am

Set Background Color for PNG

Post by armin » Mon Apr 19, 2004 8:59 am

Hi,

i have a png icon collection and want to create disabled and selected icons. I managed to create disabled icons with

nconvert -grey 256 -transparent 0 -o %_disabled.png $*

but I found no way to set the background to a specified value to create a selected icon:

nconvert -canvas 100% 100% -bgcolor 0 0 255 -o %_selected.png

did not work as expected.

It would be nice to have a way to create rollover and pressed icons also, but thats not really important.

Thanx

Armin

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

Re: Set Background Color for PNG

Post by xnview » Sat Apr 24, 2004 8:43 am

armin wrote:i have a png icon collection and want to create disabled and selected icons. I managed to create disabled icons with

nconvert -grey 256 -transparent 0 -o %_disabled.png $*

but I found no way to set the background to a specified value to create a selected icon:

nconvert -canvas 100% 100% -bgcolor 0 0 255 -o %_selected.png

did not work as expected.
-bgcolor is used to specify background color for rotate/canvas resize/...
You can use -transparent or -transpcolor.
Pierre.

Post Reply