RTG A Day in the Life 26/12/17 - the pictures



Regarding the rotation, all of the photos appeared correctly (in my preview) when I shared them.

The Two Ways an Image Can Be Rotated
Traditionally, computers have always rotated images by moving the actual pixels in the image. Digital cameras didn’t bother rotating images automatically. So, even if you used a camera and held it vertically to take a photo in portrait mode, that photo would be saved sideways, in landscape mode. You could then use an image editor program to rotate the image to appear in its correct portrait orientation. The image editor would move the pixels to rotate the image, modifying the actual image data.

This just worked, everywhere. The rotated image would appear the same in every program…as long as you took the time to manually rotate them all.

Manufacturers wanted to solve this annoyance, so they added rotation sensors to modern digital cameras and smartphones. The sensor detects which way you’re holding the camera, in an effort to rotate the photos properly. If you take an image in portrait mode, the camera knows and can act accordingly so you don’t have to rotate it yourself.

Unfortunately, there’s a small caveat. Digital camera hardware just couldn’t handle saving the image directly in rotated form. So rather than performing the computationally intensive task of rotating the entire image, the camera would add a small piece of data to the file, noting which orientation the image should be in. It adds this information to the Exif data that all photos have (which includes the model of camera you took it with, the orientation, and possibly even the GPS location where the photo was taken).

In theory, then, you could open that photo with an application, it would look at the Exif tags, and then present the photo in the correct rotation to you. The image data is saved in its original, unrotated form, but the Exif tag allows applications to correct it.

Unfortunately, not every piece of software obeys this Exif tag. Some programs–especially older image programs–will just load the image and ignore the Exif Orientation tag, displaying the image in its original, unrotated state. Newer programs that obey Exif tags will show the image with its correct rotation, so an image may appear to have different rotations in different applications.

Rotating the image doesn’t exactly help, either. Change it in an old application that doesn’t understand the Orientation tag and the application will move the actual pixels around in the image, giving it a new rotation. It’ll look correct in older applications. Open that image in a new application that obeys the Orientation tag and the application will obey the Orientation tag and flip the already rotated image around, so it’ll look wrong in those new applications.

Even in a new application that understands the Orientation tags, it’s often not quite clear whether rotating an image will move the actual pixels in the image or simply modify the Exif tags. Some applications offer an option that will ignore the Exif Orientation tag, allowing you to rotate them without the tags getting in the way.
 
Great stuff AB22, can't wait for the next one. Mid April would be great!
April 20th would be great! I'm going to a lecture about Aliens that day.

Regarding the rotation, all of the photos appeared correctly (in my preview) when I shared them.



It's possible that the EXIF tags were lost.
I honestly thought people were taking their photos in portrait.

Mine and his in the same post go perfect together.

My book cover very much resembles his photo.
This kind of thing happens often in my life its because I'm right especially in my belief in Aliens.
 
Last edited by a moderator:
Regarding the rotation, all of the photos appeared correctly (in my preview) when I shared them.



Unfortunately, not every piece of software obeys this Exif tag. Some programs–especially older image programs–will just load the image and ignore the Exif Orientation tag, displaying the image in its original, unrotated state. Newer programs that obey Exif tags will show the image with its correct rotation, so an image may appear to have different rotations in different applications.

Rotating the image doesn’t exactly help, either. Change it in an old application that doesn’t understand the Orientation tag and the application will move the actual pixels around in the image, giving it a new rotation. It’ll look correct in older applications. Open that image in a new application that obeys the Orientation tag and the application will obey the Orientation tag and flip the already rotated image around, so it’ll look wrong in those new applications.

Even in a new application that understands the Orientation tags, it’s often not quite clear whether rotating an image will move the actual pixels in the image or simply modify the Exif tags. Some applications offer an option that will ignore the Exif Orientation tag, allowing you to rotate them without the tags getting in the way.

Browsers generally don't use the image orientation data in the photo itself as this could "break" websites if images are turned round. Traditionally the way to do it is to optionally remove the orientation data from the EXIF and then manually rotate the image before uploading. Right now however, we are in a transition period where some browsers respect image orientation (if specified in the css) and others don't !

Short of removing the EXIF orientation data or setting css to not rotate and rotating the images manually, I don't know what we can do if we continue to display the images from dropbox as is currently done.

Its a shame, and something I will try to look into before the next Day in the Life.
 

Back
Top