White background when converting PNG to JPG with nconvert?

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

Moderators: XnTriq, xnview

Post Reply
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 » Wed Jul 30, 2008 2:34 pm

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 » Wed Jul 30, 2008 4:37 pm

This one DON'T work, why?

-bgcolor 255 255 255 -canvas 100% 100% center

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

Post by xnview » Wed Jul 30, 2008 6:47 pm

Use -transpcolor 255 255 255 -merge_alpha
Pierre.

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

Post by Rajko Aust » Thu Jul 31, 2008 7:54 am

Thank you, that saved me a lot of time!

Post Reply