Bug 100319 - Fix image orientation regression on mac, turn on exif-based rotation in image documents for chromium
Summary: Fix image orientation regression on mac, turn on exif-based rotation in image...
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: Images (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nico Weber
URL:
Keywords:
Depends on:
Blocks: 100191
  Show dependency treegraph
 
Reported: 2012-10-24 19:37 PDT by Nico Weber
Modified: 2012-10-25 14:19 PDT (History)
4 users (show)

See Also:


Attachments
Patch (11.72 KB, patch)
2012-10-24 19:42 PDT, Nico Weber
no flags Details | Formatted Diff | Diff
Patch (11.80 KB, patch)
2012-10-25 06:46 PDT, Nico Weber
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nico Weber 2012-10-24 19:37:32 PDT
Fix image orientation regression on mac, turn on exif-based rotation in image documents for chromium
Comment 1 Nico Weber 2012-10-24 19:42:09 PDT
Created attachment 170539 [details]
Patch
Comment 2 Nico Weber 2012-10-24 19:48:44 PDT
Pasting from irc:

if x and y are 0, it's the same as previously, and otherwise it's always adding what's missing for a identity matrix (e.g. "-1 0 0 -1" gets a +2x, +2y because that's missing to get "1 0 0 1", "0 1 1 0" gets +x-y, -y+x" to get "1 0 0 1" etc)
Comment 3 Eric Seidel (no email) 2012-10-24 22:16:17 PDT
Comment on attachment 170539 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=170539&action=review

> Source/WebCore/platform/graphics/ImageOrientation.cpp:35
> +AffineTransform ImageOrientation::transformFromDefault(const FloatRect& drawnRect) const

Confused.  Why were changes necessary here?  Please explain in the ChangeLog. :)
Comment 4 Nico Weber 2012-10-24 22:44:39 PDT
Comment on attachment 170539 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=170539&action=review

>> Source/WebCore/platform/graphics/ImageOrientation.cpp:35
>> +AffineTransform ImageOrientation::transformFromDefault(const FloatRect& drawnRect) const
> 
> Confused.  Why were changes necessary here?  Please explain in the ChangeLog. :)

I tried to explain in the changelog. Before r132384, the images were always drawn at the origin (i.e. x = y = 0). In the chromium port, and after r132384 in the apple port too, that not true, so this function needs to be updated to handle arbitrary origins. You'll note that when you set x = y = 0 in the formulas below, you get the old formulas back.
Comment 5 Nico Weber 2012-10-25 06:46:41 PDT
Created attachment 170632 [details]
Patch
Comment 6 Nico Weber 2012-10-25 12:13:11 PDT
It sounds like people prefer the alternative fix approach in bug https://bugs.webkit.org/show_bug.cgi?id=100401 . If that gets landed, the bug here becomes WontFix.
Comment 7 Nico Weber 2012-10-25 14:19:09 PDT
 https://bugs.webkit.org/show_bug.cgi?id=100401 landed. There's https://bugs.webkit.org/show_bug.cgi?id=100414 to switch ImageOrientation to rhs coordinates, which would have the same effect as this patch.