If it's a not huge image and it's not an old computer, the
straight forward solution is just to run over the picture
and compare pixel by pixel. Like the pseudocode here:
ry = heightInNbrOfPixels / 2
ry = widthInNbrOfPixels / 2
rSqr = min(heightInNbrOfPixels ,widthInNbrOfPixels) * _
min(heightInNbrOfPixels ,widthInNbrOfPixels)
for y = 1 to heightInNbrOfPixels
for x = 1 to widthInNbrOfPixels
if y*y + x*x > rSqr then _
setPixel(x,y) = white
next x
next y
-----Original Message-----
I have a square picture. I need to draw a circle on it,
and everythingoutside that circle to be set to a certain color, so the
image looks framed
On other words, I want to crop a circle form a
rectangular picture
Any hints?
.