public class BitmapHelper
extends java.lang.Object
Constructor and Description |
---|
BitmapHelper() |
Modifier and Type | Method and Description |
---|---|
static Bitmap |
convert(Drawable dable)
Creates a Bitmap from a Drawable.
|
static Bitmap |
loadImage(java.io.InputStream is)
Creates a Bitmap from an Inputstream by using Android's BitmapFactory.
|
static Bitmap |
loadImage(java.io.InputStream is,
boolean closeStream)
Creates a Bitmap from an Inputstream by using Android's BitmapFactory.
|
static Bitmap |
rescale(Bitmap bitmap,
int width,
int height)
Rescales a Bitmap.
|
public static Bitmap loadImage(java.io.InputStream is, boolean closeStream) throws java.lang.Exception
is
- the streamcloseStream
- should the stream be closed (true) or left open (false)java.lang.Exception
public static Bitmap loadImage(java.io.InputStream is) throws java.lang.Exception
is
- the streamjava.lang.Exception
public static Bitmap convert(Drawable dable)
dable
- the Drawablepublic static Bitmap rescale(Bitmap bitmap, int width, int height)
bitmap
- the bitmapwidth
- the new widthheight
- the new height