Add inPreferQualityOverSpeed into BitmapFactory.Options.

The new field allows a developer to use a more accurate by
slightly slower IDCT method in JPEG decode. This in turns improves the
quality of the reconstructed image.

The field by default is not set and thus does not affect existing
applications.

Bug: 3238925
Change-Id: I93d55b7226e47a43e639325cd1a677694d6f2ee4
This commit is contained in:
Wei-Ta Chen
2010-12-03 14:06:18 -08:00
parent 961d55fe00
commit 953f9094a2
4 changed files with 23 additions and 0 deletions

View File

@@ -204,11 +204,22 @@ public class BitmapFactory {
*/
public boolean inNativeAlloc;
/**
* If inPreferQualityOverSpeed is set to true, the decoder will try to
* decode the reconstructed image to a higher quality even at the
* expense of the decoding speed. Currently the field only affects JPEG
* decode, in the case of which a more accurate, but slightly slower,
* IDCT method will be used instead.
* @hide
*/
public boolean inPreferQualityOverSpeed;
/**
* 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 int outWidth;
/**