News:

2023-03-15 Major improvements to the new Geolocation feature

Main Menu

Change orientation of photo made by iPhone in rotated position

Started by plutov, April 05, 2013, 05:28:35 AM

Previous topic - Next topic

plutov

Hello.
I use exiftool some time for getting create date, but now I have found a problem on site. Photos that made by iPhone in rotated position uploaded to site in incorrect orientation (rotated). I know that ExifTool can overwrite orientation of file.

After some education I use this command:
exiftool -n -r -overwrite_original -if "$Orientation ne 1" -Orientation=1  test.jpg

After this I run:
exiftool -n -Orientation  test.jpg

that returns:
QuoteOrientation: 1

So command runs correct. But when i open file in windows or browser, it still rotated. I will atach this file. I don't know source of problem. Can you help me and sorry for my english.

http://dev.tuffle.com/img/memory/image/test.jpg
Also, in Chrome this image looks good.

Phil Harvey

The problem is that your Windows software doesn't respect the EXIF orientation.

The image orientation is correct in Safari.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

plutov

Hi, Phil.

Yes, in my Chrome I see image correct. But I use exiftool after image upload on my site, and this photo is always rotated after exiftooling. Should I rotate in manually using some other program?

Phil Harvey

The only way to make sure that an image is displayed correctly it to physically rotate the image and set the EXIF Orientation to 0.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).