Alpha channel detection

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

Moderators: XnTriq, helmut, xnview

Guest

Alpha channel detection

Post by Guest »

Hi,

is there any chance to use NConvert to detect whether or not an an alpha channel is stored in a certain image file? For example, I want to start NConvert and use
- a jpg file (cannot store an alpha channel)
- a png file (having an alpha channel)
- ...
to see if the image(s) contain(s) alpha (transparency) information.

I've read the built-in help file, but can't find what I'm looking for.

Thanks in advance!
User avatar
xnview
Author of XnView
Posts: 44926
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: Alpha channel detection

Post by xnview »

Anonymous wrote:Hi,

is there any chance to use NConvert to detect whether or not an an alpha channel is stored in a certain image file? For example, I want to start NConvert and use
- a jpg file (cannot store an alpha channel)
- a png file (having an alpha channel)
- ...
to see if the image(s) contain(s) alpha (transparency) information.

I've read the built-in help file, but can't find what I'm looking for.

Thanks in advance!
Perhaps if you use -info
Pierre.
chronicsmoke
Posts: 1
Joined: Thu Jul 27, 2006 5:44 pm

Post by chronicsmoke »

Thanks for the tip. "-info" was the first argument I used, but there is no direct indicator for an alpha channel. You can only use the Bitscount or Depth-value. "32" means: image contains alpha information, because the maximum number of available (RGB-)colors consumes the first 24-bit, the last 8-bit are used for the alpha channel, right?
User avatar
xnview
Author of XnView
Posts: 44926
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Post by xnview »

chronicsmoke wrote:Thanks for the tip. "-info" was the first argument I used, but there is no direct indicator for an alpha channel. You can only use the Bitscount or Depth-value. "32" means: image contains alpha information, because the maximum number of available (RGB-)colors consumes the first 24-bit, the last 8-bit are used for the alpha channel, right?
yes
Pierre.