2

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?

4

1 回答 1

2

也许您可以使用 css3 来旋转 WebView 中的图像:http: //bavotasan.com/2011/rotated-images-with-css3/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);
于 2012-08-27T07:37:56.527 回答