Alpha channel detection

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

Moderators: XnTriq, xnview

Post Reply
Guest

Alpha channel detection

Post by Guest » Thu Jul 27, 2006 6:05 pm

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: 32454
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Alpha channel detection

Post by xnview » Fri Jul 28, 2006 8:24 am

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 » Fri Jul 28, 2006 11:56 am

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: 32454
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Post by xnview » Fri Jul 28, 2006 2:36 pm

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.

Post Reply