OSDN Git Service

fix rotating normal images
authorJohn Hoford <hoford@google.com>
Wed, 17 Oct 2012 21:54:54 +0000 (14:54 -0700)
committerJohn Hoford <hoford@google.com>
Wed, 17 Oct 2012 21:54:54 +0000 (14:54 -0700)
bug:7353416
Change-Id: I86875286ea81982bdb55e9df22e44827b521d257

src/com/android/gallery3d/filtershow/cache/ImageLoader.java

index 049c4a2..6beaed6 100644 (file)
@@ -75,7 +75,6 @@ public class ImageLoader {
     public void loadBitmap(Uri uri,int size) {
         mUri = uri;
         mOrientation = getOrientation(uri);
-
         mOriginalBitmapSmall = loadScaledBitmap(uri, 160);
         if (mOriginalBitmapSmall == null) {
             // Couldn't read the bitmap, let's exit
@@ -161,7 +160,6 @@ public class ImageLoader {
                h = tmp;
            }
            switch(ori){
-               case ORI_NORMAL:
                case ORI_ROTATE_90:
                    matrix.setRotate(90,w/2f,h/2f);
                    break;
@@ -185,7 +183,9 @@ public class ImageLoader {
                    matrix.setRotate(270,w/2f,h/2f);
                    matrix.preScale(1, -1);
                    break;
+               case ORI_NORMAL:
                default:
+                   return bitmap;
             }
 
         return Bitmap.createBitmap(bitmap, 0, 0, bitmap.getWidth(),