diff options
author | daniel oeh <daniel.oeh@gmail.com> | 2012-08-06 12:53:52 +0200 |
---|---|---|
committer | daniel oeh <daniel.oeh@gmail.com> | 2012-08-06 12:53:52 +0200 |
commit | 8bde0e0fe28c2e8d08ef03777547ecf2b2a6cff4 (patch) | |
tree | eeaf916790f6baa59016678fe4784de9f895ef56 /src | |
parent | 0b62b06cdf90521571f0d916a12d7925a6dd0eed (diff) | |
download | AntennaPod-8bde0e0fe28c2e8d08ef03777547ecf2b2a6cff4.zip |
Enabled auto-scaling of bitmaps
Diffstat (limited to 'src')
-rw-r--r-- | src/de/danoeh/antennapod/asynctask/FeedImageLoader.java | 2 | ||||
-rw-r--r-- | src/de/danoeh/antennapod/util/BitmapDecoder.java | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/de/danoeh/antennapod/asynctask/FeedImageLoader.java b/src/de/danoeh/antennapod/asynctask/FeedImageLoader.java index c2686d9cf..0b71202cf 100644 --- a/src/de/danoeh/antennapod/asynctask/FeedImageLoader.java +++ b/src/de/danoeh/antennapod/asynctask/FeedImageLoader.java @@ -120,7 +120,7 @@ public class FeedImageLoader { } public void loadThumbnailBitmap(FeedImage image, ImageView target) { - if (image.getFile_url() != null) { + if (image != null && image.getFile_url() != null) { Bitmap bitmap = getBitmapFromThumbnailCache(image.getFile_url()); if (bitmap != null) { target.setImageBitmap(bitmap); diff --git a/src/de/danoeh/antennapod/util/BitmapDecoder.java b/src/de/danoeh/antennapod/util/BitmapDecoder.java index 65664ddd9..a38291b34 100644 --- a/src/de/danoeh/antennapod/util/BitmapDecoder.java +++ b/src/de/danoeh/antennapod/util/BitmapDecoder.java @@ -41,6 +41,7 @@ public class BitmapDecoder { options.inJustDecodeBounds = false; options.inSampleSize = sampleSize; options.inPreferredConfig = Bitmap.Config.ARGB_8888; + options.inScaled = false; Bitmap decodedBitmap = BitmapFactory.decodeFile(fileUrl, options); if (decodedBitmap == null) { @@ -50,10 +51,11 @@ public class BitmapDecoder { decodedBitmap = BitmapFactory.decodeFile(fileUrl); } if (decodedBitmap != null) { - + return decodedBitmap; + /* return Bitmap.createScaledBitmap(decodedBitmap, preferredLength, preferredLength, false); - + */ } else { return null; } |