W3C home > Mailing lists > Public > whatwg@whatwg.org > August 2011

[whatwg] Add "naturalOrientation" property to <img>

From: Mark Callow <callow_mark@hicorp.co.jp>
Date: Fri, 26 Aug 2011 11:10:38 -0700
Message-ID: <4E57E19E.1090500@hicorp.co.jp>


On 11/08/26 10:03, Tab Atkins Jr. wrote:
> On Fri, Aug 26, 2011 at 9:57 AM, Glenn Maynard <glenn at zewt.org> wrote:
>> Rather than baking magic EXIF constants into the API, would it make more
>> sense to translate to degrees?
> Possibly.  However, 4 of the EXIF orientations (2, 4, 5, and 7) are
> "unnatural" orientations that require mirroring the data as well as
> rotating it.
>
> We'd also need to decide whether the reported rotation is how much it
> differs from upright or the rotation needed to return it to upright
> (the difference between 90deg and -90deg).
>
The EXIF constants do not represent a degree of rotation. They describe
how the rows and columns of the image data map to the top and bottom of
the image so more flexible in some ways, as evidenced by the possible
"unnatural" orientations, and less flexible in others.

When EXIF orientation is present in the JFIF/EXIF file, I would hope the
browser would apply it whenever decoding the file and creating the image
object. If it does so , there should remain relatively few cases where
the webapp needs to read the image's natural orientation. But I have no
objection to such a property being added.

Regards

    -Mark
Received on Friday, 26 August 2011 11:10:38 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:35 UTC