public class ImageUtils
extends java.lang.Object
| Constructor and Description |
|---|
ImageUtils() |
| Modifier and Type | Method and Description |
|---|---|
static int |
getPixelsFromDP(android.content.res.Resources resources,
float dps)
Get the number of pixels scaled for the current density.
|
static android.graphics.Bitmap |
resizeBitmap(android.graphics.Bitmap b,
int maxWidth,
int maxHeight,
boolean allowLossOfPrecision)
Try to resize the given bitmap in memory, keeping it's aspect ratio to the given max dimensions.
|
public static int getPixelsFromDP(android.content.res.Resources resources,
float dps)
resources - The Resources.dps - Number of pixels in mdpi.public static android.graphics.Bitmap resizeBitmap(android.graphics.Bitmap b,
int maxWidth,
int maxHeight,
boolean allowLossOfPrecision)
b - The bitmap to scale.maxWidth - The max width.maxHeight - The max height.