Corners barely graze inner-edges of the frame's borders
Note that for the initial rotation angle shown in Figure 1,
- the corners of
the image
- almost touch the inner-edges of the borders on the frame.
If you run
the program and rotate the image,
- you will see that the size of the frame is such
- that the corners of
the image barely graze the inner-edges
- for those cases where the diagonals of
the image are horizontal and vertical.