I am trying to convert an image to string using Base64 Android class in an Android app and I succeeded in getting the string.
But when I checked the length of string for an image of size 86.13 kB (using String.length) is almost 85660. After Googling I came to know that these 2 sizes are almost same. That means though I convert image to string no data reduction happens.
My doubts are: 1) Is the both size same? 2)Is there has any another way to convert image to string that so I will data reduced.
The code I used for converting Image to String is
ByteArrayOutputStream baos=new ByteArrayOutputStream();
imageSelected.compress(Bitmap.CompressFormat.PNG,100, baos);
byte [] b=baos.toByteArray();
String temp=Base64.encodeToString(b, Base64.DEFAULT);
Guys please help. Thanks a ton in advance