Skip to content

Commit

Permalink
Compressing convert to PNG from JPEG
Browse files Browse the repository at this point in the history
  • Loading branch information
AbdulRehmanNazar committed Jul 21, 2021
1 parent fa3b4fc commit 514c6ae
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ private static Uri convertUriBitmapUtil(Context context, Uri uri) {
bitmap = MediaStore.Images.Media.getBitmap(context.getContentResolver(), imageUri);
}
ByteArrayOutputStream bytes = new ByteArrayOutputStream();
bitmap.compress(Bitmap.CompressFormat.JPEG, 100, bytes);
bitmap.compress(Bitmap.CompressFormat.PNG, 100, bytes);
String path = MediaStore.Images.Media.insertImage(context.getContentResolver(), bitmap, "Title", null);
imageUri = Uri.parse(path);
} catch (IOException e) {
Expand Down

0 comments on commit 514c6ae

Please sign in to comment.