White background when converting PNG to JPG with nconvert?

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

Moderators: helmut, XnTriq, xnview

Rajko Aust
Posts: 5
Joined: Fri Oct 13, 2006 3:35 pm

White background when converting PNG to JPG with nconvert?

Post by Rajko Aust »

Hi

What is the correct nconvert command line parameter to convert a 32bit PNG with Alpha to a JPEG, so that the Alpha channel is merged but the background is not black (as recent)?

in XnView it works when converting 32bit PNG to 24bit the background is set to white, but not in nconvert :(

thanks for your help

Rajko
Rajko Aust
Posts: 5
Joined: Fri Oct 13, 2006 3:35 pm

Post by Rajko Aust »

This one DON'T work, why?

-bgcolor 255 255 255 -canvas 100% 100% center
User avatar
xnview
Author of XnView
Posts: 45790
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Post by xnview »

Use -transpcolor 255 255 255 -merge_alpha
Pierre.
Rajko Aust
Posts: 5
Joined: Fri Oct 13, 2006 3:35 pm

Post by Rajko Aust »

Thank you, that saved me a lot of time!