summaryrefslogtreecommitdiffstats
path: root/src/com/android/gallery3d/filtershow/tools/SaveImage.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/gallery3d/filtershow/tools/SaveImage.java')
-rw-r--r--src/com/android/gallery3d/filtershow/tools/SaveImage.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/com/android/gallery3d/filtershow/tools/SaveImage.java b/src/com/android/gallery3d/filtershow/tools/SaveImage.java
index 354081ed2..c3cdea8df 100644
--- a/src/com/android/gallery3d/filtershow/tools/SaveImage.java
+++ b/src/com/android/gallery3d/filtershow/tools/SaveImage.java
@@ -402,6 +402,10 @@ public class SaveImage {
// if we have a valid size
int w = (int) (bitmap.getWidth() * sizeFactor);
int h = (int) (bitmap.getHeight() * sizeFactor);
+ if (w == 0 || h == 0) {
+ w = 1;
+ h = 1;
+ }
bitmap = Bitmap.createScaledBitmap(bitmap, w, h, true);
}
updateProgress();