Android Utililty Methods Bitmap to Byte Array Convert

List of utility methods to do Bitmap to Byte Array Convert

Description

The list of methods to do Bitmap to Byte Array Convert are organized into topic(s).

Method

byte[]getBytes(Bitmap bm)
get Bytes
ByteArrayOutputStream stream = new ByteArrayOutputStream();
bm.compress(Bitmap.CompressFormat.PNG, 100, stream);
byte[] byteArray = stream.toByteArray();
return byteArray;
intgetByteCount(Bitmap bitmap, Bitmap.CompressFormat mCompressFormat)
get Byte Count
int size = 0;
ByteArrayOutputStream output = null;
try {
    output = new ByteArrayOutputStream();
    bitmap.compress(mCompressFormat, 100, output);
    byte[] result = output.toByteArray();
    size = result.length;
    result = null;
...