|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.bumptech.glide.resize.load.ImageResizer
public class ImageResizer
A class for synchronously resizing bitmaps with or without Bitmaps to reuse
| Field Summary | |
|---|---|
static int |
PAINT_FLAGS
|
| Constructor Summary | |
|---|---|
ImageResizer()
Creates a new resizer that will not recycle Bitmaps |
|
ImageResizer(android.graphics.BitmapFactory.Options options)
Deprecated. |
|
ImageResizer(BitmapPool bitmapPool)
|
|
ImageResizer(BitmapPool bitmapPool,
android.graphics.BitmapFactory.Options defaultOptions)
Deprecated. |
|
| Method Summary | |
|---|---|
static android.graphics.Bitmap |
centerCrop(android.graphics.Bitmap recycled,
android.graphics.Bitmap toCrop,
int width,
int height)
A potentially expensive operation to crop the given Bitmap so that it fills the given dimensions. |
static android.graphics.Bitmap |
fitCenter(android.graphics.Bitmap toFit,
BitmapPool pool,
int width,
int height)
An expensive operation to resize the given Bitmap down so that it fits within the given dimensions maintain the original proportions. |
static android.graphics.Bitmap |
fitInSpace(android.graphics.Bitmap toFit,
int width,
int height)
Deprecated. |
static android.graphics.BitmapFactory.Options |
getDefaultOptions()
|
static int |
getExifOrientationDegrees(int exifOrientation)
Get the # of degrees an image must be rotated to match the given exif orientation. |
static int |
getOrientation(java.lang.String pathToOriginal)
Returns a matrix with rotation set based on Exif orientation tag. |
android.graphics.Bitmap |
load(java.io.InputStream is)
|
android.graphics.Bitmap |
load(java.io.InputStream is,
int outWidth,
int outHeight)
|
android.graphics.Bitmap |
load(java.io.InputStream is,
int outWidth,
int outHeight,
Downsampler downsampler)
|
android.graphics.Bitmap |
load(java.io.InputStream is,
int outWidth,
int outHeight,
Downsampler downsampler,
Transformation transformation)
|
android.graphics.Bitmap |
load(java.io.InputStream is,
int outWidth,
int outHeight,
Transformation transformation)
|
static android.graphics.Bitmap |
orientImage(java.lang.String pathToOriginal,
android.graphics.Bitmap imageToOrient)
This is an expensive operation that copies the image in place with the pixels rotated. |
static android.graphics.Bitmap |
rotateImage(android.graphics.Bitmap imageToOrient,
int degreesToRotate)
This is an expensive operation that copies the image in place with the pixels rotated. |
static android.graphics.Bitmap |
rotateImageExif(android.graphics.Bitmap toOrient,
BitmapPool pool,
int exifOrientation)
Rotate and/or flip the image to match the given exif orientation |
static android.graphics.Bitmap |
shrinkToHeight(android.graphics.Bitmap toShrink,
int height)
An expensive operation to resize the given image, maintaining the original proportions, so that its height matches the given height |
static android.graphics.Bitmap |
shrinkToWidth(android.graphics.Bitmap toShrink,
int width)
An expensive operation to resize the given image, maintaining the original proportions, so that its width matches the given width |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int PAINT_FLAGS
| Constructor Detail |
|---|
public ImageResizer()
public ImageResizer(BitmapPool bitmapPool)
@Deprecated public ImageResizer(android.graphics.BitmapFactory.Options options)
@Deprecated
public ImageResizer(BitmapPool bitmapPool,
android.graphics.BitmapFactory.Options defaultOptions)
Bitmaps if any are available in the given dimensions
bitmapPool - The cache to try to recycle Bitmaps from| Method Detail |
|---|
public static android.graphics.BitmapFactory.Options getDefaultOptions()
public android.graphics.Bitmap load(java.io.InputStream is)
public android.graphics.Bitmap load(java.io.InputStream is,
int outWidth,
int outHeight)
public android.graphics.Bitmap load(java.io.InputStream is,
int outWidth,
int outHeight,
Transformation transformation)
public android.graphics.Bitmap load(java.io.InputStream is,
int outWidth,
int outHeight,
Downsampler downsampler)
public android.graphics.Bitmap load(java.io.InputStream is,
int outWidth,
int outHeight,
Downsampler downsampler,
Transformation transformation)
public static android.graphics.Bitmap centerCrop(android.graphics.Bitmap recycled,
android.graphics.Bitmap toCrop,
int width,
int height)
recycled - A mutable Bitmap with dimensions width and height that we can load the cropped portion of toCrop
intotoCrop - The Bitmap to resizewidth - The width of the final Bitmapheight - The height of the final Bitmap
public static android.graphics.Bitmap shrinkToWidth(android.graphics.Bitmap toShrink,
int width)
toShrink - The Bitmap to shrinkwidth - The width of the final Bitmap
public static android.graphics.Bitmap shrinkToHeight(android.graphics.Bitmap toShrink,
int height)
toShrink - The Bitmap to shrinkheight - The height of the final Bitmap
@Deprecated
public static android.graphics.Bitmap fitInSpace(android.graphics.Bitmap toFit,
int width,
int height)
toFit - The Bitmap to shrinkwidth - The width the final image will fit withinheight - The height the final image will fit within
public static android.graphics.Bitmap fitCenter(android.graphics.Bitmap toFit,
BitmapPool pool,
int width,
int height)
toFit - The Bitmap to shrink.pool - The BitmapPool to try to reuse a bitmap from.width - The width the final image will fit within.height - The height the final image will fit within.
public static int getOrientation(java.lang.String pathToOriginal)
pathToOriginal - Path to original image file that may have exif data.
public static android.graphics.Bitmap orientImage(java.lang.String pathToOriginal,
android.graphics.Bitmap imageToOrient)
pathToOriginal - Path to original image file that may have exif data.imageToOrient - Image Bitmap to orient.
public static android.graphics.Bitmap rotateImage(android.graphics.Bitmap imageToOrient,
int degreesToRotate)
imageToOrient - Image Bitmap to orient.degreesToRotate - number of degrees to rotate the image by. If zero the original image is returned unmodified.
public static int getExifOrientationDegrees(int exifOrientation)
exifOrientation - The exif orientation [1-8]
public static android.graphics.Bitmap rotateImageExif(android.graphics.Bitmap toOrient,
BitmapPool pool,
int exifOrientation)
toOrient - The bitmap to rotate/flippool - A pool that may or may not contain an image of the necessary dimensionsexifOrientation - the exif orientation [1-8]
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||