[Bug 6672] EXIF orientation not used (rotation from digital cameras)

2011-06-13 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=6672

--- Comment #17 from Brion Vibber br...@wikimedia.org 2011-06-13 18:56:06 UTC 
---
Created attachment 8647
  -- https://bugzilla.wikimedia.org/attachment.cgi?id=8647
Sample rotated image file

This is a sample file I created to ensure we had a handy test case for related
bugs  regression checks.

Image was drawn in Gimp in portrait, manually rotated sideways, and had
appropriate EXIF orientation tag applied via:


exif -c --output=portrait-rotated.jpg --ifd=0 --tag=0x0112 --set-value=8
--no-fixup portrait-raw.jpg 


Correct preview of this file should be in portrait format, showing the arrow
pointing up and the word 'UP' legible.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
You are on the CC list for the bug.

___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 6672] EXIF orientation not used (rotation from digital cameras)

2011-06-13 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=6672

Brion Vibber br...@wikimedia.org changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|FIXED   |

--- Comment #18 from Brion Vibber br...@wikimedia.org 2011-06-13 20:53:58 UTC 
---
I've noticed a problem with the rotation  scaling on trunk; while the image
appears to be getting rotated correctly, it's scaled to the wrong dimensions in
the case of a 90-degree rotation (at least for orientation 8 which should
rotate 90 degrees left).

The thumbnail image gets re-scaled to the proper aspect ratio on the client
side, but if loaded directly will be stretched.

Test box is on Ubuntu 11.04, $wgUseImageMagick on, version:

$ convert --version
Version: ImageMagick 6.6.2-6 2011-03-16 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2010 ImageMagick Studio LLC
Features: OpenMP

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
You are on the CC list for the bug.

___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 6672] EXIF orientation not used (rotation from digital cameras)

2011-06-13 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=6672

Brion Vibber br...@wikimedia.org changed:

   What|Removed |Added

   Keywords||need-unittest

--- Comment #19 from Brion Vibber br...@wikimedia.org 2011-06-13 20:54:41 UTC 
---
Marking with need-unittest keyword; there really should be some standard source
files in the unit test suite that we can confirm get rendered to correct size
and orientation.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
You are on the CC list for the bug.

___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 6672] EXIF orientation not used (rotation from digital cameras)

2011-06-13 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=6672

--- Comment #20 from Brion Vibber br...@wikimedia.org 2011-06-13 21:10:00 UTC 
---
Scaler modes tested as of r90009:

OK:
* gd: correct size  orientation
* imext (ImageMagick PHP extension): correct size  orientation

Bad:
* im (shell-out): orientation ok, size has width/height swapped
* client: fails to rotate at all

Unknown:
* custom

It looks like the --auto-orient option on convert might be telling it to swap
its width/height, so we may need to swap them back before passing them in. (The
ImageMagick extension mode does the rotation explicitly, and explicitly swaps
the swapped width/height back first for the scaling.)

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
You are on the CC list for the bug.

___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 6672] EXIF orientation not used (rotation from digital cameras)

2011-06-13 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=6672

--- Comment #21 from Brion Vibber br...@wikimedia.org 2011-06-13 22:15:46 UTC 
---
Started adding phpunit test cases in r90016.

So far just loading in a landscape image (unrotated) and a portrait image
(rotated via EXIF orientation number 8) and checking their width/height.

The test fails on the rotated image, reporting a width of 1024 pixels instead
of the expected 768 pixels; it seems that the 'width' and 'height' are still
being reported in pre-rotation form, which isn't very useful since any view or
transformation of it will be post-rotation.

Still also need to add actual transform tests (can we test multiple backends
easily?)

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
You are on the CC list for the bug.

___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 6672] EXIF orientation not used (rotation from digital cameras)

2011-06-13 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=6672

Neil Kandalgaonkar ne...@wikimedia.org changed:

   What|Removed |Added

 CC||ne...@wikimedia.org

--- Comment #22 from Neil Kandalgaonkar ne...@wikimedia.org 2011-06-13 
23:20:34 UTC ---
The rotation implementation here is awfully complex; is there a reason to use
canvas over CSS transforms?

This relies on FileReader, and so far the only browsers that support FileReader
all support CSS transforms, at least with prefixes. We'd just have to add the
appropriate rule.

 -moz-transform:rotate(90deg);
 -o-transform:  rotate(90deg);
 -webkit-transform: rotate(90deg);
 transform: rotate(90deg);

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
You are on the CC list for the bug.

___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 6672] EXIF orientation not used (rotation from digital cameras)

2011-06-13 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=6672

--- Comment #23 from Brion Vibber br...@wikimedia.org 2011-06-13 23:23:32 UTC 
---
Well, canvas does two things for you here:

1) by scaling down, you no longer have to keep a 10MP JPEG photo uncompressed
in memory

2) by rotating, well it's rotated and now you're done. Copy-pasting the image
will work as expected; no idea if it will with a CSS transform.

and also

3) Note that EXIF orientation can include flipping as well as rotation -- see
http://sylvana.net/jpegcrop/exif_orientation.html

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
You are on the CC list for the bug.

___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 6672] EXIF orientation not used (rotation from digital cameras)

2011-06-13 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=6672

--- Comment #24 from Neil Kandalgaonkar ne...@wikimedia.org 2011-06-13 
23:25:34 UTC ---
Makes sense. Ok, canvas it is.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
You are on the CC list for the bug.

___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 6672] EXIF orientation not used (rotation from digital cameras)

2011-01-09 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=6672

--- Comment #15 from Derk-Jan Hartman hart...@videolan.org 2011-01-09 
14:31:57 UTC ---
It seems that this functionality is explicitly disabled in Safari, because it
would create further confusion. You would have one browser rotating an included
img, while all others don't. In that light, perhaps a note with Your image
contains 'orientation' settings that will be automatically applied after
upload, is a better idea than actually rotating the image...

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
You are on the CC list for the bug.

___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 6672] EXIF orientation not used (rotation from digital cameras)

2011-01-09 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=6672

--- Comment #16 from Derk-Jan Hartman hart...@videolan.org 2011-01-09 
14:33:31 UTC ---
Actually it is still under debate it seems:

https://bugs.webkit.org/show_bug.cgi?id=19688

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
You are on the CC list for the bug.

___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 6672] EXIF orientation not used (rotation from digital cameras)

2011-01-08 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=6672

--- Comment #12 from Bryan Tong Minh bryan.tongm...@gmail.com 2011-01-08 
11:42:10 UTC ---
*poke poke brion* 

Can we read out exif data using HTML5? If so we can use the canvas element to
do rotation ourself. Canvas is not supported by some stone-age browsers, but
those browsers probably can't show a thumbnail anyway.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
You are on the CC list for the bug.

___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 6672] EXIF orientation not used (rotation from digital cameras)

2011-01-08 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=6672

--- Comment #13 from Bryan Tong Minh bryan.tongm...@gmail.com 2011-01-08 
14:04:18 UTC ---
http://code.google.com/p/jsjpegmeta/ looks useful.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
You are on the CC list for the bug.

___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 6672] EXIF orientation not used (rotation from digital cameras)

2011-01-08 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=6672

--- Comment #14 from Bryan Tong Minh bryan.tongm...@gmail.com 2011-01-08 
16:25:03 UTC ---
Added javascript rotation support in r79867.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
You are on the CC list for the bug.

___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 6672] EXIF orientation not used (rotation from digital cameras)

2011-01-07 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=6672

Bryan Tong Minh bryan.tongm...@gmail.com changed:

   What|Removed |Added

 CC||bryan.tongm...@gmail.com

--- Comment #9 from Bryan Tong Minh bryan.tongm...@gmail.com 2011-01-07 
08:36:20 UTC ---
(In reply to comment #8)
 We should ask imagemagick people to add -auto-orient to the -thumbnail option
 btw, so we don't have to care about it anymore.

We do, because in the MediaHandler we still need to swap width and height
around.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
You are on the CC list for the bug.

___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 6672] EXIF orientation not used (rotation from digital cameras)

2011-01-07 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=6672

Bryan Tong Minh bryan.tongm...@gmail.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

--- Comment #10 from Bryan Tong Minh bryan.tongm...@gmail.com 2011-01-07 
22:14:54 UTC ---
Fixed in r79845.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
You are on the CC list for the bug.

___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 6672] EXIF orientation not used (rotation from digital cameras)

2011-01-07 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=6672

--- Comment #11 from Derk-Jan Hartman hart...@videolan.org 2011-01-08 
00:40:15 UTC ---
Interesting observation of note. The thumbnail in the Upload page (using the
new FileAPI) is not an actual thumbnail, but the full image of course, and it
seems that both Safari and FF for Mac, don't apply the EXIF rotation when
viewing images in the browser.

Not sure why that is, but it is rather confusing when you want to upload a file
with EXIF rotation.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
You are on the CC list for the bug.

___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 6672] EXIF orientation not used (rotation from digital cameras)

2010-08-18 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=6672

Derk-Jan Hartman hart...@videolan.org changed:

   What|Removed |Added

 CC||hart...@videolan.org

--- Comment #8 from Derk-Jan Hartman hart...@videolan.org 2010-08-18 15:43:26 
CEST ---
We should ask imagemagick people to add -auto-orient to the -thumbnail option
btw, so we don't have to care about it anymore.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
You are on the CC list for the bug.

___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 6672] EXIF orientation not used (rotation from digital cameras)

2009-12-28 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=6672


Guillaume Paumier gpaum...@wikimedia.org changed:

   What|Removed |Added

 CC||gpaum...@wikimedia.org
   Priority|High|Normal




-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
You are on the CC list for the bug.

___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 6672] EXIF orientation not used (rotation from digital cameras)

2009-12-28 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=6672


Platonides platoni...@gmail.com changed:

   What|Removed |Added

 CC||platoni...@gmail.com
   Severity|normal  |major




-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
You are on the CC list for the bug.

___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 6672] EXIF orientation not used (rotation from digital cameras)

2009-12-28 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=6672


Platonides platoni...@gmail.com changed:

   What|Removed |Added

   Severity|major   |normal
   Priority|Normal  |High




-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
You are on the CC list for the bug.

___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l