Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

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);
}
Comment

PREVIOUS NEXT
Code Example
Java :: java join list as string 
Java :: converting excel to csv in java 
Java :: java logger error 
Java :: float vs double java 
Java :: get current unix timestamp java 
Java :: binary to integer in java 
Java :: spinner event in android 
Java :: WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable 
Java :: get random string from array list 
Java :: java random primary key 
Java :: cosinus-1 java 
Java :: make window visible java 
Java :: android date 
Java :: gradle reflections 
Java :: pass list to intent in android java 
Java :: check last character of a string java 
Java :: parse string to int java 
Java :: java hashmap key exists 
Java :: java replace all not number 
Java :: how to check whether a character is alphabet or not in java 
Java :: view binding in recyclerview adapter android java 
Java :: object to int java 
Java :: literals in java 
Java :: Islands count leetcode 
Java :: java printf trailing whitespace 
Java :: java random between two strings 
Java :: final method meaning 
Java :: running sum of 1d array java 
Java :: How to determine if a graph contains a cycle, in Java? 
Java :: how to initialize array in java 
ADD CONTENT
Topic
Content
Source link
Name
6+4 =