Should be very easy for programmer...
Choose the ratio and klick on the crop-button, the frame is the same size than the image. If you move the frame on one edge you only have to read out the coordinates of the edge on the image an set the other edges in same positions at the other edges in order of the rule (3/4, 4/3, 16/9...)...should be easy