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

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

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Fri, 26 Aug 2011 10:03:38 -0700
Message-ID: <CAAWBYDAAiVNspG94Gp=EhVp6xPaFaT4g-kbjCvbKMKJV4Ncd+Q@mail.gmail.com>
On Fri, Aug 26, 2011 at 9:57 AM, Glenn Maynard <glenn at zewt.org> wrote:
> On Fri, Aug 26, 2011 at 11:37 AM, Tab Atkins Jr. <jackalmage at gmail.com>
> wrote:
>> Summary
>> =======
>> The <img> element should expose a readonly "naturalOrientation"
>> property that returns the EXIF orientation of the image (an integer
>> 1-8), or 1 if the image has no EXIF orientation metadata or it is
>> corrupted or the image type doesn't expose EXIF data at all.
> 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).

Received on Friday, 26 August 2011 10:03:38 UTC

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