Can bitmap be converted or saved to the webp format in android?
I search out for that but it turns out to be a dead end for me.
I need to save image to webp formate or else need to save in PNG/JPEG then convert to webp programmatically.
You can use CompressFormat.WEBP to encode any bitmap in WEBP format.
Example:
FileOutputStream out = new FileOutputStream(path); 
bitmap.compress(Bitmap.CompressFormat.WEBP, 100, out);
out.close();
                        If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With