Quantcast
Channel: magick Discussions Rss Feed
Viewing all articles
Browse latest Browse all 3693

New Post: Ushort Array Channels from WritablePixelCollection

$
0
0
I fetch the UInt16 array from WritablePixelCollection:
WritablePixelCollection pixels = magickImg.GetWritablePixels();
UInt16[] pixelArray = pixels.GetValues();
My image is a 16-bit grayscale so I expect the array will contain one channel but it hold R,G,B,A channels with repeated grayscale values(except the alpha channel that’s 0). Maybe it’s normal (for example the core handle every image as RGBA) and not a big problem but large grayscale images can consume a lot of resource.

Viewing all articles
Browse latest Browse all 3693

Trending Articles