Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2d2b69b0 authored by nicolasroard's avatar nicolasroard
Browse files

Fix rounding issue affecting TinyPlanet

bug:7428061
Change-Id: Ieeb4c27d4c426d7052c49ca88ca61ff0785000a3
parent a0fe81ad
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -18,12 +18,11 @@ package com.android.gallery3d.filtershow.imageshow;

import android.graphics.Bitmap;
import android.graphics.Matrix;
import android.graphics.Rect;
import android.graphics.RectF;

import com.android.gallery3d.filtershow.filters.ImageFilterGeometry;

import java.util.Arrays;

public class GeometryMetadata {
    // Applied in order: rotate, crop, scale.
    // Do not scale saved image (presumably?).
@@ -59,7 +58,11 @@ public class GeometryMetadata {
        if (mStraightenRotation != 0) {
            return true;
        }
        if (!mCropBounds.equals(mPhotoBounds)) {
        Rect cropBounds = new Rect();
        mCropBounds.roundOut(cropBounds);
        Rect photoBounds = new Rect();
        mPhotoBounds.roundOut(photoBounds);
        if (!cropBounds.equals(photoBounds)) {
            return true;
        }
        if (!mFlip.equals(FLIP.NONE)){