public class BitmapConverter extends Object
| Constructor and Description |
|---|
BitmapConverter() |
| Modifier and Type | Method and Description |
|---|---|
static Bitmap |
toBitmap(byte[] bytes)
Decode the bytes to a bitmap
|
static Bitmap |
toBitmap(byte[] bytes,
BitmapFactory.Options options)
Decode the bytes to a bitmap, with options
|
static byte[] |
toBytes(Bitmap bitmap,
Bitmap.CompressFormat format)
Compress the bitmap to a byte array at full quality
|
static byte[] |
toBytes(Bitmap bitmap,
Bitmap.CompressFormat format,
int quality)
Compress the bitmap to a byte array
|
public static Bitmap toBitmap(byte[] bytes)
bytes - public static Bitmap toBitmap(byte[] bytes, BitmapFactory.Options options)
bytes - options - public static byte[] toBytes(Bitmap bitmap, Bitmap.CompressFormat format) throws IOException
bitmap - format - IOExceptionpublic static byte[] toBytes(Bitmap bitmap, Bitmap.CompressFormat format, int quality) throws IOException
bitmap - format - quality - IOException