24-bit PNG - troubles adding an alpha

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

Moderators: helmut, XnTriq, xnview

Post Reply
rkwright
Posts: 6
Joined: Mon Mar 16, 2009 2:51 pm

24-bit PNG - troubles adding an alpha

Post by rkwright »

OK - I feel like I'm missing something. I have a 24-bit PNG that has a background value of 254,254,254 that needs to be made transparent.

I haven't had luck with any combination of the flags below (using nconvert 5.60):L

-ctype rgba
-add_alpha "value" (what is "value" supposed to represent? Can't find info in docs)
-merge_alpha
-transpcolor 254 254 254

Any thoughts on how to make an RGB png into an RGBA, with 254,254,254 having an alpha of 0?

I'd appreciate it.
User avatar
xnview
Author of XnView
Posts: 46238
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: 24-bit PNG - troubles adding an alpha

Post by xnview »

rkwright wrote:-add_alpha "value" (what is "value" supposed to represent? Can't find info in docs)
value is the alpha that you want to add
Pierre.
krawhitham
Posts: 1
Joined: Sun Jun 21, 2009 3:32 am

Re: 24-bit PNG - troubles adding an alpha

Post by krawhitham »

xnview wrote:
rkwright wrote:-add_alpha "value" (what is "value" supposed to represent? Can't find info in docs)
value is the alpha that you want to add

Code: Select all

nconvert.exe -out tga -add_alpha alpha.tga -overwrite main.tga
produces a 100% black alpha channel in main.tga

I'm I using the wrong command?
User avatar
xnview
Author of XnView
Posts: 46238
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: 24-bit PNG - troubles adding an alpha

Post by xnview »

no -add_alpha 255
Pierre.
Post Reply