I create a bitmap from a panel and I want to save this bitmap in a webp image format with the exact size of 512x512.
I tried this code, but don't works. The size the image saved is about 1500x1500.
Thanks in advance for any tip.
I tried this code, but don't works. The size the image saved is about 1500x1500.
B4X:
Dim x As B4XView = panel1
Dim b As Bitmap = x.Snapshot
Dim bm As Bitmap
Dim out As OutputStream
out = File.OpenOutput(img_dir, img_name, False)
bm.Initialize3(b)
bm.Resize(512, 512, True)
bm.WriteToStream(out,70,"WEBP")
Thanks in advance for any tip.