how to make the crop box fixed to ratio 1:1? #1183
Replies: 1 comment 1 reply
-
This is how I do it: First, set the viewport size to the right aspect ratio:function gciCropImage() { // Get the cropped image as a base64 PNG. // Then on the server side in PHP, I save the image as a file: Now, image sizes are really measured in pixels, so to get an image that is exactly 2cm x 2cm, you have to set the dots per cm, and then resize the image to 2cm x 2cm to get the metadata set correctly. |
Beta Was this translation helpful? Give feedback.
-
I am doing a project for school. We want the crop box unable to resize but fixed to 1:1 ratio or 2cm x 2cm.
Beta Was this translation helpful? Give feedback.
All reactions