I have encoded the imageview using base64 and passed that value to textview as hidden as i have successfully inserted into db. my code to encode:
public void convertImg(){
imageView.buildDrawingCache();
Bitmap bm = imageView.getDrawingCache();
ByteArrayOutputStream baos = new ByteArrayOutputStream();
bm.compress(Bitmap.CompressFormat.JPEG, 100, baos); //bm is the bitmap object
byte[] b = baos.toByteArray();
String encodedImage = Base64.encodeToString(b , Base64.DEFAULT);
base64.setText(encodedImage);
}
This is what im getting in my mysql db. is it correct?
My question is how to decode it and where to see/view it?