CSS Image Orientation Lands in Firefox 26
sethfowler.org
sethfowler.org
That said, what I don't understand myself is software devs that thinks it's ok to rotate the pixels and saving the image with EXIF tags without updating the rotation one.
Most people, including software developers, think of JPEG as just a bunch of pixels.
I think if you were to do a random survey of software developers, most wouldn't know that the rotation field exists, and an appalling percentage wouldn't even know that EXIF exists.
Now that I think about it, I wonder what percentage would know that JPEG is a compressed format, let alone the fact that it's lossy...
Because that would make the camera cpu subsystem $0.50 more expensive.
This CSS tag could still be marginally useful: you could store only one corner and one side of a custom border, and flip the image for the other three. Once the tag is ubiquitous, of course.
It's what `image-orientation: from-image` does.
But it can't be done automatically (you have to explicitly use this property), that would break the web: until now, images were not rotated automatically, so developers might have rotated their images in CSS (`transform:rotate(90deg)`). If Firefox were to rotate automatically the images according to the exif data, you'd get a double rotation, or unexpected image rotations.
Btw, images are oriented correctly on Mobile Safari.
*{ image-orientation: from-image }
to your CSS file to apply it everywhere.I haven't seen any examples of a website implementing custom rotation using css or canvas, it wasn't even possible to read EXIF data on the client until a year or so. Is it a real concern?
It's a shame backward compatibility has to be so rigid. It's hard to imagine there being that many sites out there using manually rotated (or transform: rotated) images with EXIF data that would cause a double rotation. But at least I understand the rationale behind the tag now. Of course, the unfortunate irony is that with so little browser support, this CSS rule is likely to end up causing incompatibility between browsers anyway, at least for the next few years.
So, what's your issue?
This isn't standards-compliant behavior. I had no idea that there were any browsers that actually did this!