Add BitmapFactory.Options.inMutable to load mutable bitmaps.

Change-Id: Iaa222127520f3aa55072d44af12ee3477908b876
This commit is contained in:
Romain Guy
2011-01-17 12:51:55 -08:00
parent 875862e3ec
commit 2361098da3
5 changed files with 41 additions and 5 deletions

View File

@@ -63,6 +63,14 @@ public class BitmapFactory {
*/
public Bitmap inBitmap;
/**
* If set, decode methods will always return a mutable Bitmap instead of
* an immutable one. This can be used for instance to programmatically apply
* effects to a Bitmap loaded through BitmapFactory.
*/
@SuppressWarnings({"UnusedDeclaration"}) // used in native code
public boolean inMutable;
/**
* If set to true, the decoder will return null (no bitmap), but
* the out... fields will still be set, allowing the caller to query
@@ -523,7 +531,7 @@ public class BitmapFactory {
}
bm.setDensity(targetDensity);
}
return bm;
}