Android Question [Solved] How to resize a bitmap to a exact size (500dip x 500dip)?

asales

Expert
Licensed User
Longtime User
I use this code to resize a bitmap (and save later):
B4X:
bmpTemp.Resize(500dip, 500dip, True)

But in somes devices, when I save the bitmap, I get different sizs: 1000 x 1000 (2x), 1500 x 1500 (3x)...

How I can resize the bitmap and save it in the exact size (500dip x 500dip)?

Thanks in advance for any tip.
 
Last edited:

Peter Simpson

Expert
Licensed User
Longtime User
Why do you need exactly 500²?
Are you using Autoscale in the designer?
 
Upvote 0

asales

Expert
Licensed User
Longtime User
You need to do it on your PC. The Images for whatsapp need to be in webp format. You need to create them on the PC as there is no library for B4X to create them.
I'm doing it in my PC, to use with your lib.
But now, I'm testing other option to the user create your own sticker using the app.
I can save the image in WEBP format using B4A, but I need the size of the bitmap is exact.
 
Upvote 0
Top