In my android application i am using whatsapp like image compression and after that i convert the compressed image bitmap to string using Base64 encoding,what i noticed is that
There's one big difference in your images though.
The image you store as a file is stored as a JPEG
bitmapImg.compress(Bitmap.CompressFormat.JPEG, 80, out);
while the Base64 encoded string is a PNG
bitmapImg.compress(Bitmap.CompressFormat.PNG, 100, byteArrayOS);
This can explain the size differences. Another thing could be, that bitmapImg
changed it's contents inbetween both compressions as well.