W3C home > Mailing lists > Public > whatwg@whatwg.org > March 2015

Re: [whatwg] Effect of image-orientation on naturalWidth/Height

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Fri, 13 Mar 2015 13:28:40 -0700
Message-ID: <CAAWBYDAyvRq2n209hdNxAy+SQKmG3MzDEXk5yK14KiUxCV4Neg@mail.gmail.com>
To: Seth Fowler <seth@mozilla.com>
Cc: WHATWG <whatwg@whatwg.org>
On Fri, Mar 13, 2015 at 12:21 PM, Seth Fowler <seth@mozilla.com> wrote:
>> On Mar 13, 2015, at 11:56 AM, Tab Atkins Jr. <jackalmage@gmail.com> wrote:
>> If it happens at the markup level, it should *definitely* affect the
>> naturalWidth/Height properties.  I don't think that's in question at
>> all.  But nobody's moved on the markup issue, so I haven't removed the
>> CSS property yet. ^_^
> Not to rehash comments that I and others have already made in bug 25508, but I think specifying whether we honor EXIF orientation on a per-image basis is not really very interesting.
> By far the most desirable outcome, if it’s sufficiently web-compatible, is to just respect EXIF orientation by default.

Yup, agreed, that's the best solution.  Let's make it happen. ^_^

> If we can’t do that, then I think content authors will mostly just opt in via a single “img { image-orientation: from-image }” in their CSS. That’s the simplest opt in solution that’s feasible. It’s also trivial to encapsulate in a standard CSS library.
> I’m opposed to the removal of the CSS property for a markup-based solution, as that will force content authors to specify “autorotate” on every single <img> element on the page. That’s a waste of effort and bandwidth (though admittedly compression will make the impact there minimal), and it makes it more likely that content authors will simply forget to do so on some elements. Encapsulating this solution is also significantly more heavyweight.
> Having a DOM-based way to request that EXIF orientation be respected is desirable, though, so that it can be used with non-HTML uses of images like canvas.

Agree with all of this.  It's still unclear, though, whether the
effects of the CSS property should be reflected in the
naturalWidth/Height properties, which is the subject of this thread.
If we can get away with just always autorotating, the question is
moot, which is ideal.

Received on Friday, 13 March 2015 20:29:22 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 17:00:29 UTC