summaryrefslogtreecommitdiffstats
path: root/src/com/android/gallery3d/filtershow/filters/ImageFilterFx.java
diff options
context:
space:
mode:
authorJohn Hoford <hoford@google.com>2012-10-16 12:39:29 -0700
committerJohn Hoford <hoford@google.com>2012-10-16 13:36:07 -0700
commit5a69dcc8de22788cf57425e317337d5017c3673c (patch)
treed4416e7851d129688b99e016fae609bcde16d640 /src/com/android/gallery3d/filtershow/filters/ImageFilterFx.java
parent9c64bdafa7efaef9eaa7eb9fe7b6207be483bef7 (diff)
downloadandroid_packages_apps_Snap-5a69dcc8de22788cf57425e317337d5017c3673c.tar.gz
android_packages_apps_Snap-5a69dcc8de22788cf57425e317337d5017c3673c.tar.bz2
android_packages_apps_Snap-5a69dcc8de22788cf57425e317337d5017c3673c.zip
prevent original now acts like any other FX filter
bug:7353358 Change-Id: Id4efa45ddb8a8a0ca6d201ffc0b45fdd2f3caabf
Diffstat (limited to 'src/com/android/gallery3d/filtershow/filters/ImageFilterFx.java')
-rw-r--r--src/com/android/gallery3d/filtershow/filters/ImageFilterFx.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/com/android/gallery3d/filtershow/filters/ImageFilterFx.java b/src/com/android/gallery3d/filtershow/filters/ImageFilterFx.java
index 1575b18bb..7d8f41537 100644
--- a/src/com/android/gallery3d/filtershow/filters/ImageFilterFx.java
+++ b/src/com/android/gallery3d/filtershow/filters/ImageFilterFx.java
@@ -12,7 +12,7 @@ import java.util.Arrays;
public class ImageFilterFx extends ImageFilter {
private static final String TAG = "ImageFilterFx";
Bitmap fxBitmap;
-
+ public static final String ORIG = "Original";
public ImageFilterFx(Bitmap fxBitmap,String name) {
setFilterType(TYPE_FX);
mName = name;
@@ -29,6 +29,8 @@ public class ImageFilterFx extends ImageFilter {
native protected void nativeApplyFilter(Bitmap bitmap, int w, int h,Bitmap fxBitmap, int fxw, int fxh);
public Bitmap apply(Bitmap bitmap, float scaleFactor, boolean highQuality) {
+ if (fxBitmap==null)
+ return bitmap;
int w = bitmap.getWidth();
int h = bitmap.getHeight();