Snap to grid cropping

asked 2017-08-16 03:48:44 -0500

This may be called "Region of Interest" I'm not exactly sure. But, what I'd like to do is rather easy to explain.

I have a photo that I need to align to a grid.

For starters; the little text that says "here" must be 151px from the top of the screen.

Next; from "here" to position 8 of the chin must be 631px

Finally; a straight line down the middle of the picture at line 28 on the nose must be done.

If i'm not making sense please tell me to elaborate.

I have the following ideas (this is pseudo code)

It is simply to loop until the requirements are met with a resize function, a lot like brute forcing but thats all i can think of..


while (top.x,y = 151,0)  ## this puts the image one pixel above until reaching the desired positioning
while (top.x,y & eight.x,y != 631)
resize += 1 # resize by 1 pixel until the height is reached
## center the nose
image.position = nose.
edit retag flag offensive close merge delete