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: 7
Joined: 2017-08-29T06:37:37-07:00
Authentication code: 1151

colordepth of the whole image not the separate channels?

Post by tco95ttocs » 2017-10-11T04:05:58-07:00

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: 9378
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 » 2017-10-11T05:32:01-07:00

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: 1380
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 » 2017-10-11T22:12:08-07:00

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: 7
Joined: 2017-08-29T06:37:37-07:00
Authentication code: 1151

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

Post by tco95ttocs » 2017-10-11T23:36:28-07:00

thx for the fast answer

Post Reply