asales Expert Licensed User Longtime User Jul 9, 2018 #1 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 ResizeAndCrop6a.zip 102.4 KB · Views: 801
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.
Erel B4X founder Staff member Licensed User Longtime User Jul 10, 2018 #2 I've created a new CropView custom view. You can try it: https://www.b4x.com/android/forum/threads/b4x-xui-cropview.94952/ Upvote 0
I've created a new CropView custom view. You can try it: https://www.b4x.com/android/forum/threads/b4x-xui-cropview.94952/
klaus Expert Licensed User Longtime User Jul 11, 2018 #3 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: Jul 11, 2018 Upvote 0
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.