Sample 10#
The example prints an image into a rectangle with a width of 100mm and a height of 100mm, but keep the aspect ratio of the picture – therefore the frame height will be adjusted. The original size is 1920×1208 pixels.
Next it prints an image into a rectangle with a width of 100mm and a height of 30mm, but keep the aspect ratio of the picture – therefore the frame width will be adjusted.
Last it prints an image into a rectangle with a width of 20mm and a height of 40mm, it does not keep the aspect ratio of the picture.