colordepth of the whole image not the separate channels?

Magick.NET is an object-oriented C# interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning Magick.NET
Post Reply
tco95ttocs
Posts: 20
Joined: 2017-08-29T06:37:37-07:00
Authentication code: 1151

colordepth of the whole image not the separate channels?

Post by tco95ttocs »

Hi guys,

is there a possibility to get the colordepth of an image?
For example i have a 4 channel tif-file and each channel has 8bit.
So is there a function which gives me 32 as the colordepth of the image?

thanks
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: colordepth of the whole image not the separate channels?

Post by snibgo »

I don't use Magick.NET, but I don't think there is a function for that. You can write your own, that multiplies the number of channels by the bits per channel.
snibgo's IM pages: im.snibgo.com
User avatar
dlemstra
Posts: 1570
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: colordepth of the whole image not the separate channels?

Post by dlemstra »

There is no function for that but you could do `image.Depth * image.ChannelCount` as @snibgo suggested.
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate
tco95ttocs
Posts: 20
Joined: 2017-08-29T06:37:37-07:00
Authentication code: 1151

Re: colordepth of the whole image not the separate channels?

Post by tco95ttocs »

thx for the fast answer
Post Reply