Page 1 of 1

Grayscale JPG colortype

Posted: 2019-08-26T16:58:22-07:00
by superstator
I am using Magick.NET Q8 to work with a variety of images from .NET, and I've noticed that when loading an 8-bit grayscale JPG it reports the ColorType as Palette, with a ColormapSize of 256. To the best of my knowledge, JPEG doesn't support any palette color, and 8-bit grayscale really is stored as a single-channel image - technically just the Y component of YCbCr. Given that, shouldn't a grayscale loaded from a .jpg file report a ColorType == ColorType.Grayscale, and ColormapSize == -1? Is this an ImageMagick thing or a Magick.NET thing? Or am I just misunderstanding something?

Re: Grayscale JPG colortype

Posted: 2019-08-26T17:48:21-07:00
by snibgo
superstator wrote:... when loading an 8-bit grayscale JPG it reports the ColorType as Palette, ...
IM is reporting how the image is stored in memory, after the file has been read. In general this may be different to how the data was stored in the file.