public class BitmapUtils extends Object
Modifier and Type | Field and Description |
---|---|
static int |
UNCONSTRAINED |
Modifier and Type | Method and Description |
---|---|
static byte[] |
compressToBytes(Bitmap bitmap) |
static byte[] |
compressToBytes(Bitmap bitmap,
int quality) |
static int |
computeSampleSize(float scale) |
static int |
computeSampleSize(int width,
int height,
int minSideLength,
int maxNumOfPixels) |
static int |
computeSampleSizeLarger(float scale) |
static int |
computeSampleSizeLarger(int w,
int h,
int minSideLength) |
static Bitmap |
createVideoThumbnail(String filePath) |
static boolean |
isRotationSupported(String mimeType) |
static boolean |
isSupportedByRegionDecoder(String mimeType) |
static void |
recycleSilently(Bitmap bitmap) |
static Bitmap |
resizeAndCropCenter(Bitmap bitmap,
int size,
boolean recycle) |
static Bitmap |
resizeBitmapByScale(Bitmap bitmap,
float scale,
boolean recycle) |
static Bitmap |
resizeDownBySideLength(Bitmap bitmap,
int maxLength,
boolean recycle) |
static Bitmap |
rotateBitmap(Bitmap source,
int rotation,
boolean recycle) |
public static final int UNCONSTRAINED
public static int computeSampleSize(int width, int height, int minSideLength, int maxNumOfPixels)
public static int computeSampleSizeLarger(int w, int h, int minSideLength)
public static int computeSampleSizeLarger(float scale)
public static int computeSampleSize(float scale)
public static Bitmap resizeBitmapByScale(Bitmap bitmap, float scale, boolean recycle)
public static Bitmap resizeDownBySideLength(Bitmap bitmap, int maxLength, boolean recycle)
public static Bitmap resizeAndCropCenter(Bitmap bitmap, int size, boolean recycle)
public static void recycleSilently(Bitmap bitmap)
public static byte[] compressToBytes(Bitmap bitmap)
public static byte[] compressToBytes(Bitmap bitmap, int quality)
public static boolean isSupportedByRegionDecoder(String mimeType)
public static boolean isRotationSupported(String mimeType)