am e9b386fa: am 9ab175f5: swap output dims after rotating image.

* commit 'e9b386faa572bc3046f67aa5a34d1594c46c404c':
  swap output dims after rotating image.
diff --git a/src/com/android/dreams/phototable/PhotoSource.java b/src/com/android/dreams/phototable/PhotoSource.java
index 7f1dd51..670bd02 100644
--- a/src/com/android/dreams/phototable/PhotoSource.java
+++ b/src/com/android/dreams/phototable/PhotoSource.java
@@ -191,18 +191,18 @@
 
                     if (data.orientation != 0) {
                         log(TAG, "rotated by " + data.orientation + ": fixing");
+                        Matrix matrix = new Matrix();
+                        matrix.setRotate(data.orientation,
+                                (float) Math.floor(image.getWidth() / 2f),
+                                (float) Math.floor(image.getHeight() / 2f));
+                        image = Bitmap.createBitmap(image, 0, 0,
+                                                    options.outWidth, options.outHeight,
+                                                    matrix, true);
                         if (data.orientation == 90 || data.orientation == 270) {
                             int tmp = options.outWidth;
                             options.outWidth = options.outHeight;
                             options.outHeight = tmp;
                         }
-                        Matrix matrix = new Matrix();
-                        matrix.setRotate(data.orientation,
-                                         (float) image.getWidth() / 2,
-                                         (float) image.getHeight() / 2);
-                        image = Bitmap.createBitmap(image, 0, 0,
-                                                    options.outHeight, options.outWidth,
-                                                    matrix, true);
                     }
 
                     log(TAG, "returning bitmap " + image.getWidth() + ", " + image.getHeight());