|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectandroid.graphics.BitmapFactory
public class BitmapFactory
Creates Bitmap objects from various sources, including files, streams, and byte-arrays.
| Nested Class Summary | |
|---|---|
static class |
BitmapFactory.Options
|
| Constructor Summary | |
|---|---|
BitmapFactory()
|
|
| Method Summary | |
|---|---|
static Bitmap |
decodeByteArray(byte[] data,
int offset,
int length)
Decode an immutable bitmap from the specified byte array. |
static Bitmap |
decodeByteArray(byte[] data,
int offset,
int length,
BitmapFactory.Options opts)
Decode an immutable bitmap from the specified byte array. |
static Bitmap |
decodeFile(String pathName)
Decode a file path into a bitmap. |
static Bitmap |
decodeFile(String pathName,
BitmapFactory.Options opts)
Decode a file path into a bitmap. |
static Bitmap |
decodeFileDescriptor(FileDescriptor fd)
Decode a bitmap from the file descriptor. |
static Bitmap |
decodeFileDescriptor(FileDescriptor fd,
Rect outPadding,
BitmapFactory.Options opts)
Decode a bitmap from the file descriptor. |
static Bitmap |
decodeResource(Resources res,
int id)
Decode an image referenced by a resource ID. |
static Bitmap |
decodeResource(Resources res,
int id,
BitmapFactory.Options opts)
Decode an image referenced by a resource ID. |
static Bitmap |
decodeStream(InputStream is)
Decode an input stream into a bitmap. |
static Bitmap |
decodeStream(InputStream is,
Rect outPadding,
BitmapFactory.Options opts)
Decode an input stream into a bitmap. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BitmapFactory()
| Method Detail |
|---|
public static Bitmap decodeFile(String pathName,
BitmapFactory.Options opts)
pathName - complete path name for the file to be decoded.opts - null-ok; Options that control downsampling and whether the
image should be completely decoded, or just is size returned.
public static Bitmap decodeFile(String pathName)
pathName - complete path name for the file to be decoded.
public static Bitmap decodeResource(Resources res,
int id,
BitmapFactory.Options opts)
res - The resources object containing the image dataid - The resource id of the image dataopts - null-ok; Options that control downsampling and whether the
image should be completely decoded, or just is size returned.
public static Bitmap decodeResource(Resources res,
int id)
res - The resources object containing the image dataid - The resource id of the image data
public static Bitmap decodeByteArray(byte[] data,
int offset,
int length,
BitmapFactory.Options opts)
data - byte array of compressed image dataoffset - offset into imageData for where the decoder should begin
parsing.length - the number of bytes, beginning at offset, to parseopts - null-ok; Options that control downsampling and whether the
image should be completely decoded, or just is size returned.
public static Bitmap decodeByteArray(byte[] data,
int offset,
int length)
data - byte array of compressed image dataoffset - offset into imageData for where the decoder should begin
parsing.length - the number of bytes, beginning at offset, to parse
public static Bitmap decodeStream(InputStream is,
Rect outPadding,
BitmapFactory.Options opts)
is - The input stream that holds the raw data to be decoded into a
bitmap.outPadding - If not null, return the padding rect for the bitmap if
it exists, otherwise set padding to [-1,-1,-1,-1]. If
no bitmap is returned (null) then padding is
unchanged.opts - null-ok; Options that control downsampling and whether the
image should be completely decoded, or just is size returned.
public static Bitmap decodeStream(InputStream is)
is - The input stream that holds the raw data to be decoded into a
bitmap.
public static Bitmap decodeFileDescriptor(FileDescriptor fd,
Rect outPadding,
BitmapFactory.Options opts)
fd - The file descriptor containing the bitmap data to decodeoutPadding - If not null, return the padding rect for the bitmap if
it exists, otherwise set padding to [-1,-1,-1,-1]. If
no bitmap is returned (null) then padding is
unchanged.opts - null-ok; Options that control downsampling and whether the
image should be completely decoded, or just is size returned.
public static Bitmap decodeFileDescriptor(FileDescriptor fd)
fd - The file descriptor containing the bitmap data to decode
|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||