java.lang.Object | |
↳ | android.graphics.BitmapFactory |
Creates Bitmap objects from various sources, including files, streams, and byte-arrays.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
BitmapFactory.Options |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Decode an immutable bitmap from the specified byte array.
| |||||||||||
Decode an immutable bitmap from the specified byte array.
| |||||||||||
Decode a file path into a bitmap.
| |||||||||||
Decode a file path into a bitmap.
| |||||||||||
Decode a bitmap from the file descriptor.
| |||||||||||
Decode a bitmap from the file descriptor.
| |||||||||||
Decode an image referenced by a resource ID.
| |||||||||||
Decode an image referenced by a resource ID.
| |||||||||||
Decode an input stream into a bitmap.
| |||||||||||
Decode an input stream into a bitmap.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class java.lang.Object
|
Decode an immutable bitmap from the specified byte array.
data | byte array of compressed image data |
---|---|
offset | offset into imageData for where the decoder should begin parsing. |
length | the number of bytes, beginning at offset, to parse |
Decode an immutable bitmap from the specified byte array.
data | byte array of compressed image data |
---|---|
offset | offset into imageData for where the decoder should begin parsing. |
length | the number of bytes, beginning at offset, to parse |
opts | null-ok; Options that control downsampling and whether the image should be completely decoded, or just is size returned. |
Decode a file path into a bitmap. If the specified file name is null, or cannot be decoded into a bitmap, the function returns null.
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. |
Decode a file path into a bitmap. If the specified file name is null, or cannot be decoded into a bitmap, the function returns null.
pathName | complete path name for the file to be decoded. |
---|
Decode a bitmap from the file descriptor. If the bitmap cannot be decoded return null. The position within the descriptor will not be changed when this returns, so the descriptor can be used again as is.
fd | The file descriptor containing the bitmap data to decode |
---|---|
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. |
Decode a bitmap from the file descriptor. If the bitmap cannot be decoded return null. The position within the descriptor will not be changed when this returns, so the descriptor can be used again as is.
fd | The file descriptor containing the bitmap data to decode |
---|
Decode an image referenced by a resource ID.
res | The resources object containing the image data |
---|---|
id | The resource id of the image data |
Decode an image referenced by a resource ID.
res | The resources object containing the image data |
---|---|
id | The resource id of the image data |
opts | null-ok; Options that control downsampling and whether the image should be completely decoded, or just is size returned. |
Decode an input stream into a bitmap. If the input stream is null, or cannot be used to decode a bitmap, the function returns null. The stream's position will be where ever it was after the encoded data was read.
is | The input stream that holds the raw data to be decoded into a bitmap. |
---|
Decode an input stream into a bitmap. If the input stream is null, or cannot be used to decode a bitmap, the function returns null. The stream's position will be where ever it was after the encoded data was read.
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. |