summaryrefslogtreecommitdiffstats
path: root/src/com/android/gallery3d/filtershow/filters/ImageFilterGeometry.java
diff options
context:
space:
mode:
authorRuben Brunk <rubenbrunk@google.com>2012-11-27 16:13:32 -0800
committerRuben Brunk <rubenbrunk@google.com>2012-11-27 16:24:46 -0800
commitd830f2a1b5becddfbae68e758fe29d6eda3777d8 (patch)
treeba4dcef7a7831e968116ad597cf438ddaa8b5d05 /src/com/android/gallery3d/filtershow/filters/ImageFilterGeometry.java
parenta314235e093032c2d6cdd1f1d3f6b5c10c3e75a7 (diff)
downloadandroid_packages_apps_Snap-d830f2a1b5becddfbae68e758fe29d6eda3777d8.tar.gz
android_packages_apps_Snap-d830f2a1b5becddfbae68e758fe29d6eda3777d8.tar.bz2
android_packages_apps_Snap-d830f2a1b5becddfbae68e758fe29d6eda3777d8.zip
Minor fix for some FP rounding errors in crop.
Bug 7566505 Change-Id: Ic3b849b26e0435e0e51a3ddd80c25d8e6e9949aa
Diffstat (limited to 'src/com/android/gallery3d/filtershow/filters/ImageFilterGeometry.java')
-rw-r--r--src/com/android/gallery3d/filtershow/filters/ImageFilterGeometry.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/com/android/gallery3d/filtershow/filters/ImageFilterGeometry.java b/src/com/android/gallery3d/filtershow/filters/ImageFilterGeometry.java
index bdcb0ea4e..d74a6faab 100644
--- a/src/com/android/gallery3d/filtershow/filters/ImageFilterGeometry.java
+++ b/src/com/android/gallery3d/filtershow/filters/ImageFilterGeometry.java
@@ -72,7 +72,7 @@ public class ImageFilterGeometry extends ImageFilter {
Rect cropBounds = new Rect(0, 0, bitmap.getWidth(), bitmap.getHeight());
RectF crop = mGeometry.getCropBounds(bitmap);
if (crop.width() > 0 && crop.height() > 0)
- crop.roundOut(cropBounds);
+ cropBounds = GeometryMath.roundNearest(crop);
Bitmap temp = null;
if (mGeometry.hasSwitchedWidthHeight()) {
temp = Bitmap.createBitmap(cropBounds.height(), cropBounds.width(), mConfig);