Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Conversion of bitmap into jpeg in android [closed]

Is there any way to convert a android.graphics.Bitmap instance into jpeg in android?

like image 325
Nitish Avatar asked Jun 09 '12 10:06

Nitish


People also ask

How do I convert a picture to JPEG on Android?

The current file format used by your Android device is displayed under the Screenshot format entry. To change it, tap on it. To change the screenshot format on your Android to JPG or PNG, tap on the file type you want to use from the dropdown menu.

How do I save a bitmap image in Android 11?

To save the bitmap to Android storage, you could create a FileStream object with the path and then call the Bitmap. Compress method to generate the picture. Check the code: var folder = Android.


1 Answers

Try with compress method like:

bitmap.compress(Bitmap.CompressFormat.JPEG, quality, outStream);

Here is a sample program : compressing-a-bitmap-to-jpg-format-android-example

like image 186
Imran Rana Avatar answered Oct 02 '22 15:10

Imran Rana