Bug 52963 - Image orientation is wrong in webview
Summary: Image orientation is wrong in webview
Alias: None
Product: Forms
Classification: Xamarin
Component: Android ()
Version: 2.3.5
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: Paul DiPietro [MSFT]
Depends on:
Reported: 2017-03-02 04:39 UTC by Shay
Modified: 2017-06-15 20:56 UTC (History)
3 users (show)

Tags: webview image ac
Is this bug a regression?: ---
Last known good build:

Test Project (52.04 KB, application/zip)
2017-03-02 16:00 UTC, Shay

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report for Bug 52963 on Developer Community or GitHub if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:

Description Shay 2017-03-02 04:39:06 UTC
I am experiencing a bug related to wrong image orientation presentation in WebView.
Scenario: a local html page is loaded into a WebView Controller. The web page contains a link to a jpeg image (for example,
Image appears in the correct orientation using Xamarin Forms for iOS, but appears rotated 90 degrees in Xamarin Forms for Android.
I suspect this is related to correctly reading the orientation tag in the EXIF field, but it's not clear why WebView is not presenting it correctly.

=== Xamarin Studio Business ===

Version 6.2 (build 1821)
Installation UUID: 07360e74-2c80-443b-94a1-6221c776bc97
	Mono 4.8.0 (mono-4.8.0-branch/e4a3cf3) (64-bit)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 408000495

=== NuGet ===


=== Xamarin.Profiler ===

Version: 1.2.0
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler

=== Apple Developer Tools ===

Xcode 8.2.1 (11766.1)
Build 8C1002

=== Xamarin.iOS ===

Version: (Xamarin Business)
Hash: 35d1ccd
Branch: cycle9
Build date: 2017-02-16 17:40:00-0500

=== Xamarin.Mac ===

Version: (Xamarin Business)

=== Xamarin Inspector ===

Hash: cdc01b9
Branch: 1.1-release
Build date: Wed, 22 Feb 2017 23:24:11 GMT

=== Xamarin.Android ===

Version: (Xamarin Business)
Android SDK: /Users/shayo/Library/Android/sdk
	Supported Android versions:
		4.0.3 (API level 15)
		4.4   (API level 19)
		5.0   (API level 21)
		5.1   (API level 22)
		6.0   (API level 23)
		7.0   (API level 24)
		7.1   (API level 25)

SDK Tools Version: 25.2.5
SDK Platform Tools Version: 25.0.3
SDK Build Tools Version: 25.0.1

Java SDK: /usr
java version "1.8.0_112"
Java(TM) SE Runtime Environment (build 1.8.0_112-b16)
Java HotSpot(TM) 64-Bit Server VM (build 25.112-b16, mixed mode)

Android Designer EPL code available here:

=== Xamarin Android Player ===

Version: 0.6.5
Location: /Applications/Xamarin Android Player.app

=== Build Information ===

Release ID: 602001821
Git revision: d41b6e51f3fa46a1943f2e31a778d28a7c73d069
Build date: 2017-02-17 15:18:19-05
Xamarin addins: 1363a8d943bab7700c93a97474060b6734aa7f94
Build lane: monodevelop-lion-cycle9

=== Operating System ===

Mac OS X 10.12.2
Darwin Shays-MacBook-Pro.local 16.3.0 Darwin Kernel Version 16.3.0
    Thu Nov 17 20:23:58 PST 2016
    root:xnu-3789.31.2~1/RELEASE_X86_64 x86_64
Comment 1 Paul DiPietro [MSFT] 2017-03-02 14:46:19 UTC
Can you possibly upload a reproduction to be looked at? Does this happen on any emulator/device or only specific ones, if you'd attempted to try that yet to see what happens?
Comment 2 Shay 2017-03-02 14:47:56 UTC
What do you mean by a "reproduction" ?
Comment 3 Paul DiPietro [MSFT] 2017-03-02 15:00:36 UTC
A project that can be run to demonstrate the issue. It helps for investigating what's going on and making sure that we're seeing the exact code that the reporter would want us to see.
Comment 4 Shay 2017-03-02 16:00:47 UTC
Created attachment 20089 [details]
Test Project
Comment 5 Shay 2017-03-02 16:01:51 UTC
Here you go. Project attached.
On Android emulator it shows the image rotated and on iOS emulator it shows it in the correct orientation. Inconsistent behavior.
Comment 6 Paul DiPietro [MSFT] 2017-06-15 20:56:28 UTC
Setting this to confirmed for now as upkeep. This could be a potential edge case causing the issue (or perhaps something else) but will require further investigation.