Android Question [Solved] Resize and Crop - Square Image


Well-Known Member
Licensed User
Longtime User
I'm using this code from @klaus (thanks!):
to crop an image and works fine (image1), but not if I use a square image (2):
(1) 1.jpg (2)2.jpg

If I use a square image (same width and height) I don't see the yellow markers to resize and crop the image in portrait mode.

I tried to change the code (MaxHeight, MaxWidth, etc.), but I don't figure out how to see the markers and crop the square image.

The original code with the square image is in attached.

Thanks in advance for any tip to fix this problem.


    102.4 KB · Views: 359


Licensed User
Longtime User
Here you have a new version which handles also square images.
The code has been improved managing images with any width/height ratio in both orientations.
You find it HERE.
Last edited:
Upvote 0