dimanche 28 décembre 2014

android: Stored Images in SqLite is taking 2x more space

I want to store jpg images in a SqLite database and I am using this code to convert bitmap to array of bytes.



public static byte[] getBitmapAsByteArray(Bitmap bitmap) {
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
bitmap.compress(CompressFormat.JPEG, 100, outputStream);
return outputStream.toByteArray();
}


the issue that image take more than 2x of it's size in database


Aucun commentaire:

Enregistrer un commentaire