English | Site Directory

Android - An Open Handset Alliance Project

android.graphics
public static class

android.graphics.BitmapFactory.Options

java.lang.Object
android.graphics.BitmapFactory.Options

Summary

Fields

public      boolean  inJustDecodeBounds  If set to true, the decoder will return null (no bitmap), but the out... 
public      int  inSampleSize  If set to a value > 1, requests the decoder to subsample the original image, returning a smaller image to save memory. 
public      int  outHeight  The resulting height of the bitmap, set independent of the state of inJustDecodeBounds. 
public      int  outWidth  The resulting width of the bitmap, set independent of the state of inJustDecodeBounds. 

Public Constructors

          BitmapFactory.Options()
Methods inherited from class java.lang.Object

Details

Fields

public boolean inJustDecodeBounds

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.

public int inSampleSize

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.

public int outHeight

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.

public int outWidth

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.

Public Constructors

public BitmapFactory.Options()

Build m5-rc15g - 14 May 2008 12:50