Check if pixel belongs to shape ?
-
- Posts: 6
- Joined: 2011-02-06T08:09:27-07:00
- Authentication code: 8675308
Check if pixel belongs to shape ?
Does MagickCore have means of testing if a given pixel is in a given region of the image (circle, polygon, ..) ?
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Check if pixel belongs to shape ?
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.
snibgo's IM pages: im.snibgo.com