java.lang.Object | |
↳ | android.graphics.BitmapFactory.Options |
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
inDither | If dither is true, the decoder will atttempt to dither the decoded image. | ||||||||||
inJustDecodeBounds | If set to true, the decoder will return null (no bitmap), but the out... | ||||||||||
inPreferredConfig | If this is non-null, the decoder will try to decode into this internal configuration. | ||||||||||
inSampleSize | If set to a value > 1, requests the decoder to subsample the original image, returning a smaller image to save memory. | ||||||||||
inTempStorage | Temp storage to use for decoding. | ||||||||||
mCancel | Flag to indicate that cancel has been called on this object. | ||||||||||
outHeight | The resulting height of the bitmap, set independent of the state of inJustDecodeBounds. | ||||||||||
outMimeType | If known, this string is set to the mimetype of the decoded image. | ||||||||||
outWidth | The resulting width of the bitmap, set independent of the state of inJustDecodeBounds. |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Create a default Options object, which if left unchanged will give
the same result from the decoder as if null were passed.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
This can be called from another thread while this options object is
inside a decode...
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class java.lang.Object
|
If dither is true, the decoder will atttempt to dither the decoded image.
If set to true, the decoder will return null (no bitmap), but the out... fields will still be set, allowing the caller to query the bitmap without having to allocate the memory for its pixels.
If this is non-null, the decoder will try to decode into this internal configuration. If it is null, or the request cannot be met, the decoder will try to pick the best matching config based on the system's screen depth, and characteristics of the original image such as if it has per-pixel alpha (requiring a config that also does).
If set to a value > 1, requests the decoder to subsample the original image, returning a smaller image to save memory. The sample size is the number of pixels in either dimension that correspond to a single pixel in the decoded bitmap. For example, inSampleSize == 4 returns an image that is 1/4 the width/height of the original, and 1/16 the number of pixels. Any value <= 1 is treated the same as 1. Note: the decoder will try to fulfill this request, but the resulting bitmap may have different dimensions that precisely what has been requested. Also, powers of 2 are often faster/easier for the decoder to honor.
Temp storage to use for decoding. Suggest 16K or so.
Flag to indicate that cancel has been called on this object. This is useful if there's an intermediary that wants to first decode the bounds and then decode the image. In that case the intermediary can check, inbetween the bounds decode and the image decode, to see if the operation is canceled.
The resulting height of the bitmap, set independent of the state of inJustDecodeBounds. However, if there is an error trying to decode, outHeight will be set to -1.
If known, this string is set to the mimetype of the decoded image. If not know, or there is an error, it is set to null.
The resulting width of the bitmap, set independent of the state of inJustDecodeBounds. However, if there is an error trying to decode, outWidth will be set to -1.
Create a default Options object, which if left unchanged will give the same result from the decoder as if null were passed.
This can be called from another thread while this options object is inside a decode... call. Calling this will notify the decoder that it should cancel its operation. This is not guaranteed to cancel the decode, but if it does, the decoder... operation will return null, or if inJustDecodeBounds is true, will set outWidth/outHeight to -1