How to extract alpha channel with NConvert

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

Moderators: XnTriq, helmut, xnview

ARandomNerd
Posts: 1
Joined: Thu Feb 18, 2021 11:57 pm

How to extract alpha channel with NConvert

Post by ARandomNerd »

I'm using XnView 2.49.5 and NConvert 7.70.

I have an NConvert script, exported from XNView and edited (to point to the nconvert.exe and process all images in a given folder), that's supposed to create an alpha mask of the input images by extracting the alpha channel.

Code: Select all

"Nconvert/nconvert.exe" -npcd 2 -size 256x256+0 -ctype rgb -corder inter -out png -extract "C:\MovieSprites\Mask\*.png" 
The correct output would look like this: (And it works, in batch processing from XNView)

Image -> Image

Instead, NConvert is giving me this:

Image -> Image

Which is the red channel, not the alpha channel. I looked at the output of "nconvert -help" to see if -extract could take any parameters, and it doesn't actually list the -extract option at all.

How do I make this work correctly?

[EDIT] Nevermind, installed ImageMagick and used it instead