Answers for "how to convert uri image to bitmap in android"

1

how to convert bitmap to uri in 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
0

bitmap to image android

val decodedString: ByteArray = Base64.decode(String_URI, Base64.NO_WRAP)
val img = BitmapFactory.decodeByteArray(decodedString, 0, decodedString.size)
Posted by: Guest on August-23-2021

Code answers related to "how to convert uri image to bitmap in android"

Browse Popular Code Answers by Language