diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/providers/contacts/PhotoProcessor.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/com/android/providers/contacts/PhotoProcessor.java b/src/com/android/providers/contacts/PhotoProcessor.java index de6e93a..d2a33d2 100644 --- a/src/com/android/providers/contacts/PhotoProcessor.java +++ b/src/com/android/providers/contacts/PhotoProcessor.java @@ -134,10 +134,10 @@ import java.io.IOException; } } float scaleFactor = ((float) maxDim) / Math.max(width, height); - if (scaleFactor < 1.0 || cropLeft != 0 || cropTop != 0) { + if (scaleFactor < 1.0f || cropLeft != 0 || cropTop != 0) { // Need to scale or crop the photo. Matrix matrix = new Matrix(); - matrix.setScale(scaleFactor, scaleFactor); + if (scaleFactor < 1.0f) matrix.setScale(scaleFactor, scaleFactor); scaledBitmap = Bitmap.createBitmap( mOriginal, cropLeft, cropTop, width, height, matrix, false); } |