Page 1 of 1

Loading monochrome pixel into MagickImage

Posted: 2019-01-21T07:28:46-07:00
by knr
I kan load/read a raw RGB pixel array into a MagickImage.

Code: Select all

PixelStorageSettings pixelStorageSettings = new PixelStorageSettings(100, 100, StorageType.Short, PixelMapping.BGR);
var colorImage = new MagickImage(myImageDataByteArray, pixelStorageSettings);
How do I load/read a monochrome pixel data? PixelMapping type only support color images.

Re: Loading monochrome pixel into MagickImage

Posted: 2019-01-21T11:08:08-07:00
by dlemstra
You should use the `string` overload instead.

Code: Select all

new PixelStorageSettings(100, 100, StorageType.Short,"R")

Re: Loading monochrome pixel into MagickImage

Posted: 2019-01-22T03:48:27-07:00
by knr
Thanks dlemstra :D
Your solution works.