diff options
author | Ray Chen <raychen@google.com> | 2009-07-20 16:33:41 +0800 |
---|---|---|
committer | Ray Chen <raychen@google.com> | 2009-07-29 19:00:13 +0800 |
commit | 012d0f38e1fd547436675257c5cd5c62928e2ed5 (patch) | |
tree | 884ff5188b25ea36698ac458cdf4e356c91e656c /src/com/android/camera/gallery/BaseImage.java | |
parent | b53862357d977643c760c4eaeb0b7dcc841727f6 (diff) | |
download | LegacyCamera-012d0f38e1fd547436675257c5cd5c62928e2ed5.zip LegacyCamera-012d0f38e1fd547436675257c5cd5c62928e2ed5.tar.gz LegacyCamera-012d0f38e1fd547436675257c5cd5c62928e2ed5.tar.bz2 |
Defer bitmap rotation until it's drawn on ImageView.
Diffstat (limited to 'src/com/android/camera/gallery/BaseImage.java')
-rw-r--r-- | src/com/android/camera/gallery/BaseImage.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/com/android/camera/gallery/BaseImage.java b/src/com/android/camera/gallery/BaseImage.java index 4ff963c..8f0525a 100644 --- a/src/com/android/camera/gallery/BaseImage.java +++ b/src/com/android/camera/gallery/BaseImage.java @@ -164,6 +164,12 @@ public abstract class BaseImage implements IImage { } public Bitmap fullSizeBitmap(int minSideLength, int maxNumberOfPixels, + boolean rotateAsNeeded) { + return fullSizeBitmap(minSideLength, maxNumberOfPixels, + rotateAsNeeded, IImage.NO_NATIVE); + } + + public Bitmap fullSizeBitmap(int minSideLength, int maxNumberOfPixels, boolean rotateAsNeeded, boolean useNative) { Uri url = mContainer.contentUri(mId); if (url == null) return null; @@ -174,6 +180,7 @@ public abstract class BaseImage implements IImage { if (b != null && rotateAsNeeded) { b = Util.rotate(b, getDegreesRotated()); } + return b; } @@ -202,7 +209,7 @@ public abstract class BaseImage implements IImage { return mDateTaken; } - protected int getDegreesRotated() { + public int getDegreesRotated() { return 0; } |