B4J Library [B4X] [XUI] xResizeAndCrop

GeoT

Active Member
Licensed User
Only the value in bold will change.

Samsung Galaxy Grand Prime+ with Android 6.1
Original size (width x height)Device in portraitDevice in landscape
400 x 600400 x 600400 x 600
800 x 1067800 x 1067800 x 1067
800 x 533800 x 533800 x 533
3264 x 24483264 x 24483264 x 2454
250 x 250250 x 250250 x 250
1440 x 14401440 x 14401440 x 1440

Samsung Galaxy A50 with Android 11
Original size (width x height)Device in portraitDevice in landscape
400 x 600400 x 600400 x 600
800 x 1067800 x 1067800 x 1067
800 x 533800 x 533800 x 533
3264 x 24483264 x 24483264 x 2448
250 x 250250 x 250250 x 250
1440 x 14401440 x 14401440 x 1440

Only one value fails.

Thank you.
 

klaus

Expert
Licensed User
Longtime User
The remaining value failing is due to the low resolution of the device.
The dimensions of the cropped image is calculated from the positions of the sliders.
I check if the difference of calculated width and the real image width is smaller than 5 pixels.
In your case the difference is bigger.
I will try something else.
 

GeoT

Active Member
Licensed User
Ok.
Thank you Klaus.
Tomorrow I test it.
I'm in a stadium watching football now.
 

GeoT

Active Member
Licensed User
Now if it does it right in all cases.

Thank you very much, klaus.

Now I will add a code that gets the orientation of the exif data from bitmap.
 

klaus

Expert
Licensed User
Longtime User
The xResizeAndCrop library has been updated to version 1.7 in the first post.
Set the crop window to the entire image when the width / height ratio is NONE
Only the xResizeAndCrop.b4xlib and the xResizeAndCrop.xml files have been replaced.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…