Answers for "Uri from bitmap java android"

2

Uri from bitmap java android

public Uri getImageUri(Context inContext, Bitmap inImage) {
  ByteArrayOutputStream bytes = new ByteArrayOutputStream();
  inImage.compress(Bitmap.CompressFormat.JPEG, 100, bytes);
  String path = MediaStore.Images.Media.insertImage(inContext.getContentResolver(), inImage, "Title", null);
  return Uri.parse(path);
}
Posted by: Guest on July-14-2021

Code answers related to "Uri from bitmap java android"

Browse Popular Code Answers by Language