de.msponer.android.yac.activities.images
Class BitmapResizer
java.lang.Object
de.msponer.android.yac.activities.images.BitmapResizer
public class BitmapResizer
- extends Object
Class for resizing bitmaps.
- Author:
- msponer
Method Summary |
String |
getBase64EncodedResizedBitmap(Bitmap mBitmap,
int displayWidth,
int displayHeight)
Resizes a given bitmap that it fits the specified width and height and
returns the resized image encoded with BASE64. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RESIZE_FACTOR
public static final double RESIZE_FACTOR
- The resize factor is 0.9. Images are resized in 10 percent steps until
they fit the screen.
- See Also:
- Constant Field Values
COMPRESSION_LEVEL
public static final int COMPRESSION_LEVEL
- The JPEG compression level: 50.
- See Also:
- Constant Field Values
BitmapResizer
public BitmapResizer()
getBase64EncodedResizedBitmap
public String getBase64EncodedResizedBitmap(Bitmap mBitmap,
int displayWidth,
int displayHeight)
- Resizes a given bitmap that it fits the specified width and height and
returns the resized image encoded with BASE64.
- Parameters:
mBitmap
- The bitmap to resize.displayWidth
- The display width in pixels.displayHeight
- The display height in pixels.
- Returns:
- The resized bitmap encoded with BASE64