Not logged in. · Lost password · Register
Forum: General Help and Support General Stuff RSS
Images are rotated
Avatar
AjaxOfTheRockies #1
Member since Dec 2017 · 18 posts
Group memberships: Members
Show profile · Link to this post
Subject: Images are rotated
Hi everyone.

I have an in-house wiki built on DokuWiki and am having great results. However, images I upload appear rotated 90 degrees.  I saw a thread that suggested using GIMP and that does work

However, I receive pictures from our branches all across the country.  They all display rotated even though they originate from all kinds of devices and different 'photographers'; and it is a real PitA to touch every single one of them.

Suggestions?


- a -
Avatar
aubreyb #2
Member since Feb 2017 · 14 posts
Group memberships: Members
Show profile · Link to this post
That is because they (probably) are rotated. I suspect they are rotated images which are showing as upright in whatever other viewer you happen to be using because they have the EXIF rotation bit set. Maybe attach a small image that causes a problem here.

Dokuwiki ignores the rotation tag (as does pretty much the whole of the internet) -- web browsers mostly don't understand the rotation tag.

https://github.com/splitbrain/dokuwiki/issues/2293

You need to rotate the image itself AND reset the rotation tag in the EXIF - otherwise viewers that do respect the orientation tag will rotate it again. Not so much a dokuwiki problem as a problem created by EXIF and camera designers - instead of swopping X and Y axes of images when the camera is rotated, camera designers decided to use EXIF metadata to fake it for some viewers.

If you have many such images, there are tools out there that will do a loss-less (important) rotate and strip the relevant metadata in a bunch of files all at once.
This post was edited on 2018-05-14, 15:53 by aubreyb.
Avatar
AjaxOfTheRockies #3
Member since Dec 2017 · 18 posts
Group memberships: Members
Show profile · Link to this post
Thanks for the clarification.  I can't discern any pattern as to which are rotated and which are not - most come from iPhones.  All of them, FWIW, appear properly oriented when loaded into GIMP - which is the tool I've been using for this problem.
  If I must rotate each one, a tool that could do them in batches it would be a huge help.  I have 68 branch offices from which I get upwards of 25 pictures each.

Is there any setting on an iPhone my guys in the field could make so they are oriented correctly when they email them to me?

Attached is an example of one I got from our Oklahoma City branch:

[Image: http://helpdesk.commandonline.com/_images/rotated1.jpg]
Avatar
aubreyb #4
Member since Feb 2017 · 14 posts
Group memberships: Members
Show profile · Link to this post
The file you posted has EXIF data which looks like this (note that it includes GPS data too):

The 4th line says that in some viewers the image should be rotated so that the -- all it is telling you is that the phone was rotated when the picture was taken.... It then rotates it back ion some viewers (but not generally in web browsers) -- this is just an illusion!

Don't know what operating system you are working on but Irfanview is an example of simple software that you can use to process the data.

The ones that are rotated will be the ones where they rotated the phone and where the phone sets the orientation tag.

Since you are using gimp see
https://butterflyofdream.wordpress.com/2012/10/17/how-to-t…

You can set GIMP to respect the tag or not (or to ask you)

Make - Apple
Model - iPhone 6s
Orientation - Right top
XResolution - 72
YResolution - 72
ResolutionUnit - Inch
Software - 11.3.1
DateTime - 2018:05:11 15:05:00
YCbCrPositioning - Centered
ExifOffset - 206
ExposureTime - 1/30 seconds
FNumber - 2.20
ExposureProgram - Normal program
ISOSpeedRatings - 100
ExifVersion - 0221
DateTimeOriginal - 2018:05:11 15:05:00
DateTimeDigitized - 2018:05:11 15:05:00
ComponentsConfiguration - YCbCr
ShutterSpeedValue - 1/30 seconds
ApertureValue - F 2.20
BrightnessValue - 3.03
ExposureBiasValue - 0
MeteringMode - Multi-segment
Flash - Flash not fired, auto mode
FocalLength - 4.15 mm
SubsecTimeOriginal - 017
SubsecTimeDigitized - 017
FlashPixVersion - 0100
ColorSpace - sRGB
ExifImageWidth - 4032
ExifImageHeight - 3024
SensingMethod - One-chip color area sensor
SceneType - Other
ExposureMode - Auto
White Balance - Auto
FocalLengthIn35mmFilm - 29 mm
SceneCaptureType - Standard
Lens Info - 4.15  4.15  2.20  2.20
Lens Make - Apple
Lens Model - iPhone 6s back camera 4.15mm f/2.2
GPS information: -
GPSLatitudeRef - N
GPSLatitude - 41  9  54.28 (41.165078)
GPSLongitudeRef - W
GPSLongitude - 95  55  28.23 (95.924508)
GPSAltitudeRef - Sea level
GPSAltitude - 312.78 m
GPSTimeStamp - 20  4  59
GPSImgDirectionRef - True direction
GPSImgDirection - 345.765823
GPSDateStamp - 2018:05:11
Avatar
aubreyb #5
Member since Feb 2017 · 14 posts
Group memberships: Members
Show profile · Link to this post
Try googling : rotate images depending on orientation tag lossless

You will see various tools that losslessly rotate the actual images depending on the orientation tag.
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Go to forum
Imprint
This board is powered by the Unclassified NewsBoard software, 20150713-dev, © 2003-2015 by Yves Goergen
Current time: 2018-07-20, 23:53:57 (UTC +02:00)