diff options
author | John Hoford <hoford@google.com> | 2013-02-12 11:55:50 -0800 |
---|---|---|
committer | John Hoford <hoford@google.com> | 2013-02-12 12:11:35 -0800 |
commit | c04f50dd1ed5523c21e587bc899e7d3610e68b25 (patch) | |
tree | c968e18872ef3ef9a155f440eef9e3389667f132 /src/com/android/gallery3d/filtershow/presets | |
parent | 3d3a66695f3d022a71e8b9c77326eb68cd15b31d (diff) | |
download | android_packages_apps_Snap-c04f50dd1ed5523c21e587bc899e7d3610e68b25.tar.gz android_packages_apps_Snap-c04f50dd1ed5523c21e587bc899e7d3610e68b25.tar.bz2 android_packages_apps_Snap-c04f50dd1ed5523c21e587bc899e7d3610e68b25.zip |
refactor quality to be int
Change-Id: I0470abdbe75cf48c5228e80b9dc060ae6f3d8bbd
Diffstat (limited to 'src/com/android/gallery3d/filtershow/presets')
-rw-r--r-- | src/com/android/gallery3d/filtershow/presets/ImagePreset.java | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/src/com/android/gallery3d/filtershow/presets/ImagePreset.java b/src/com/android/gallery3d/filtershow/presets/ImagePreset.java index c7d14e80b..adea9deb3 100644 --- a/src/com/android/gallery3d/filtershow/presets/ImagePreset.java +++ b/src/com/android/gallery3d/filtershow/presets/ImagePreset.java @@ -35,7 +35,10 @@ public class ImagePreset { private FilterRepresentation mBorder = null; private float mScaleFactor = 1.0f; - private boolean mIsHighQuality = false; + public static final int QUALITY_ICON = 0; + public static final int QUALITY_PREVIEW = 1; + public static final int QUALITY_FINAL = 2; + private int mQuality = QUALITY_PREVIEW; private ImageLoader mImageLoader = null; private Vector<FilterRepresentation> mFilters = new Vector<FilterRepresentation>(); @@ -380,14 +383,14 @@ public class ImagePreset { public Bitmap applyGeometry(Bitmap bitmap) { // Apply any transform -- 90 rotate, flip, straighten, crop // Returns a new bitmap. - return mGeoData.apply(bitmap, mScaleFactor, mIsHighQuality); + return mGeoData.apply(bitmap, mScaleFactor, mQuality); } public Bitmap applyBorder(Bitmap bitmap) { if (mBorder != null && mDoApplyGeometry) { ImageFilter filter = FiltersManager.getManager().getFilterForRepresentation(mBorder); filter.useRepresentation(mBorder); - bitmap = filter.apply(bitmap, mScaleFactor, mIsHighQuality); + bitmap = filter.apply(bitmap, mScaleFactor, mQuality); } return bitmap; } @@ -408,7 +411,7 @@ public class ImagePreset { } ImageFilter filter = FiltersManager.getManager().getFilterForRepresentation(representation); filter.useRepresentation(representation); - bitmap = filter.apply(bitmap, mScaleFactor, mIsHighQuality); + bitmap = filter.apply(bitmap, mScaleFactor, mQuality); } } @@ -429,12 +432,12 @@ public class ImagePreset { return mScaleFactor; } - public boolean isHighQuality() { - return mIsHighQuality; + public int getQuality() { + return mQuality; } - public void setIsHighQuality(boolean value) { - mIsHighQuality = value; + public void setQuality(int value) { + mQuality = value; } public void setScaleFactor(float value) { |