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

New Post: Getting pixel color

$
0
0
I have been trying to get color of a pixel, and have used the examples found in the forum. But it seems like using the methods is not giving the right result for the alpha channel.

The files i am having problems with is this file returns 255, where another file returns 0 for the alpha channel

The file that return 0 is not even transparent - is there a way to better determine color and transparency.

This is my code.

Pixel pixel = image.GetReadOnlyPixels().GetPixel(x, y);
red = pixel.GetChannel(0);
green = pixel.GetChannel(1);
blue = pixel.GetChannel(2);
alpha = pixel.GetChannel(3);

Viewing all articles
Browse latest Browse all 3693

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>