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

Commit ed7eec60 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Set minimum scaled width/height to 1"

parents 9d9ee526 a358d761
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -1869,8 +1869,8 @@ public final class ImageDecoder implements AutoCloseable {
        }
        }


        float scale = (float) dstDensity / srcDensity;
        float scale = (float) dstDensity / srcDensity;
        int scaledWidth = (int) (mWidth * scale + 0.5f);
        int scaledWidth = Math.max((int) (mWidth * scale + 0.5f), 1);
        int scaledHeight = (int) (mHeight * scale + 0.5f);
        int scaledHeight = Math.max((int) (mHeight * scale + 0.5f), 1);
        this.setTargetSize(scaledWidth, scaledHeight);
        this.setTargetSize(scaledWidth, scaledHeight);
        return dstDensity;
        return dstDensity;
    }
    }