Issue
I add several images to a WebView
and images are rotated 90 degrees from what's expected.
This is because the Samsung camera shoots with .jpg photos + EXIF rotation tag.
Same images appear fine in the gallery but not in my WebView
.
String htmlWithImages = "<html> <some html>";
htmlWithImages += imageUri; // Image's content uri like content://
mWebView.loadDataWithBaseURL("", htmlWithImages, "text/html", "utf-8", "");
Is this a bug in WebView
? Any workarounds?
Solution
Maybe you can use css3 to rotate the images inside the WebView: http://bavotasan.com/2011/rotated-images-with-css3/ or http://www.kavoir.com/2009/08/css-rotate-text-image-elements-by-90-180-or-270-degrees.html
-webkit-transform: rotate(-90deg);
-moz-transform: rotate(-90deg);
Answered By - Zelter Ady
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.