Android Question [Solved] Resize and Crop - Square Image

asales

Expert
Licensed User
Longtime User
I'm using this code from @klaus (thanks!):
https://www.b4x.com/android/forum/threads/resize-and-crop.82436/#post-522422
to crop an image and works fine (image1), but not if I use a square image (2):
(1) (2)

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.
 

Attachments

  • ResizeAndCrop6a.zip
    102.4 KB · Views: 394

klaus

Expert
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
Cookies are required to use this site. You must accept them to continue using the site. Learn more…