Page 1 of 1

Check if pixel belongs to shape ?

Posted: 2013-10-23T22:04:45-07:00
by ExpertNoob
Does MagickCore have means of testing if a given pixel is in a given region of the image (circle, polygon, ..) ?

Re: Check if pixel belongs to shape ?

Posted: 2013-10-24T04:59:18-07:00
by snibgo
Draw the shape as white on a black background. Find the colour of the pixel. If it's white, it's inside the shape. Black means it's outside. Grey means it's on the edge.