[whatwg] Add "naturalOrientation" property to <img>
Tab Atkins Jr.
jackalmage at gmail.com
Fri Aug 26 10:03:38 PDT 2011
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>
>> 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
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).
More information about the whatwg