This project has moved. For the latest updates, please go here.

GetValues() question

Sep 16, 2015 at 9:19 AM
I have the following code using Magick.NET-7.0.0.0018-Q16 (or .0017)
MagickImage img_src = new MagickImage(new MagickColor(32768, 16384, 1024), 3, 3);
PixelCollection pc = img_src.GetReadOnlyPixels();
ushort[] data = pc.GetValues();
The array will have a length of 27 and will look like this: 32768, 0, 0, 32768, 0, 0, 32768, 0...
If I add alpha the array length will be 36 and will be: 32768, 0, 0, 0, 32768, 0, 0, 0...
Why are G and B values zero or how can I access them? Thanks!
Coordinator
Sep 17, 2015 at 7:37 AM
It seems you found a bug. I just pushed a patch to fix this, it also includes a unit test to make sure it stays fixed.
Sep 17, 2015 at 10:54 AM
Thank you