Image EXIF Orientation Bug – or Feature?
blog.praveen.science
blog.praveen.science
I went to the linked specification (https://www.w3.org/TR/css3-images/#image-orientation) and "from-image" is not specified here as a possible value of "image-orientation".
https://www.w3.org/TR/2012/WD-css4-images-20120911/#the-imag...
>Note that some devices will "tag" an image with some metadata indicating its correct orientation, so image viewing software can do the necessary transformation themselves. Due to legacy compatibility restraints, Web browsers are required to ignore this data by default. A future level of this specification is expected to have a value that applies the metadata-specified transformation automatically.
IMO EXIF rotation should be applied always, and any CSS rotations should combine with it, not override.
I agree. EXIF rotation is a part of the image and it's just an implementation detail of the image data. Browsers shouldn't leak this.
But it has been dropped from the next version which states:
> If the image has an orientation specified in its metadata, such as EXIF, the UA must rotate or flip the image to correctly orient it as the metadata specifies.
As for Wordpress people using third party services to remove bloat from images in a paid for, tediously manual way - don't! Configure your server to do it with Google's mod_pagespeed. You can serve src_set images whilst you are at it that way making the web quicker and more eco friendly.
(Oh, and feature. Definitely feature.)
convert -auto-orient in.jpg out.jpg convert /?
Converts a FAT volume to NTFS.
CONVERT volume /FS:NTFS [/V] [/CvtArea:filename] [/NoSecurity] [/X]
volume Specifies the drive letter (followed by a colon),
mount point, or volume name.
/FS:NTFS Specifies that the volume will be converted to NTFS.
/V Specifies that Convert will be run in verbose mode.
/CvtArea:filename
Specifies a contiguous file in the root directory
that will be the place holder for NTFS system files.
/NoSecurity Specifies that the security settings on the converted
files and directories allow access by all users.
/X Forces the volume to dismount first if necessary.
All open handles to the volume will not be valid.
You probably can't do any damage attempting to use it to convert images, but there might be a way to screw up attempting to convert an image so badly you destroy your filesystem.1. Will this work without having to install new software on Windows, Mac, Linux?
2. Will this degrade image quality?
2. It isn't lossless, no. I think jpegtran can do this, but you'll need to first read the correct orientation out of the EXIF data and then give the right arguments to jpegtran. Since the loss in quality is tiny, I just use -auto-orient.