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

On 2015-03-10 09:29, Anne van Kesteren wrote:
> On Tue, Mar 10, 2015 at 12:01 AM, Seth Fowler <seth@mozilla.com> wrote:
>> I wanted to get the opinion of this list on how image-orientation and the <img> element’s naturalWidth and naturalHeight properties should interact.
> I thought there was some agreement that image-orientation ought to be
> a markup feature as it affects the semantics of the image (or perhaps
> investigate whether rotating automatically is feasible):
>
>    https://www.w3.org/Bugs/Public/show_bug.cgi?id=25508
>
>

Just my opinion, but I believe rotation of a image should be stored in 
the image itself. With JPG this is possible. Not sure about PNG or WebP 
or SVG though.

Now if a image space in a webpage (as reserved by css or width height in 
a image tag) is say 4:3 but the image has info about rotation so it ends 
up 3:4 instead then the ideal is for the browser to with that 3:4 
rotated image within the reserved 4:3 space.
The closest analogy I can think of are "black bars" on movies, although 
in this case it would be the background behind the image showing through 
maybe.

If attributes or CSS override the orientation of an image I'd consider 
that an "image effect" instead.


-- 
Roger Hågensen, Freelancer

Received on Tuesday, 10 March 2015 15:28:41 UTC