Permalink
Browse files

Merge pull request #977 from wordpress-mobile/issue/967-resize-image-…

…wpspan

Fix #967 resize picture for wpspan
  • Loading branch information...
2 parents 96de266 + 7852ab2 commit d98266f70c1663ae6dbf2769d9cb2ef5601bcfed @roundhill roundhill committed Feb 27, 2014
@@ -1024,18 +1024,13 @@ private boolean addMedia(Uri imageUri, SpannableStringBuilder ssb) {
mediaTitle = getResources().getString(R.string.video);
} else {
ImageHelper ih = new ImageHelper();
- Map<String, Object> mediaData = ih.getImageBytesForPath(imageUri.getEncodedPath(), getActivity());
- if (mediaData == null) {
- // data stream not returned
- return false;
- }
-
- thumbnailBitmap = ih.getThumbnailForWPImageSpan(getActivity(), (byte[]) mediaData.get("bytes"), (String) mediaData.get("orientation"));
+ thumbnailBitmap = ih.getThumbnailForWPImageSpan(getActivity(), imageUri.getEncodedPath());
+
if (thumbnailBitmap == null)
return false;
- mediaTitle = (String) mediaData.get("title");
+ mediaTitle = ih.getTitleForWPImageSpan(getActivity(), imageUri.getEncodedPath());
}
WPImageSpan is = new WPImageSpan(getActivity(), thumbnailBitmap, imageUri);
Oops, something went wrong.

0 comments on commit d98266f

Please sign in to comment.