Reference:Android.graphics.BitmapFactory.Options

From Triled Wiki

Jump to: navigation, search


android.graphics
public static class android.graphics.BitmapFactory.Options

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

Contents

[edit] Summary

[edit] 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.  

[edit] Public Constructors

          BitmapFactory.Options ()

[edit] Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

[edit] Details

[edit] Fields

[edit] 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.

[edit] 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.

[edit] 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.

[edit] 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.

[edit] Public Constructors

[edit] public BitmapFactory.Options()

[edit] References

Personal tools