Page MenuHomePhabricator

incorrect duplicate EXIF IFD0:Orientation tag handling ("Warning: Duplicate Orientation tag in IFD0")
Open, MediumPublicBUG REPORT

Description

Author: saibotrash

Description:
Was there a recent change in EXIF orientation processing on Wikimedia Commons? Sadly mediawiki rotates files if a duplicate orientation tag (with conflicting info!) is present at image files.

There was a bug in Apple's iPhoto4 and it seems we have some files from it ;)
input this in google: "Warning: Duplicate Orientation tag in IFD0" → Apple products.

Example: one tag is 1 and another is 8. mediawiki uses the 8 instead of ignoring this obvious crap.

GIMP, gthumb do not do this. They apparently only use the tag if there is only one ;)

Example: https://commons.wikimedia.org/wiki/File:Pol_Roger_pupitre_4.jpg

Or see my upload log of 2011-12-07 and -08 https://commons.wikimedia.org/w/index.php?title=Special%3ALog&type=upload&user=Saibo&page=&year=&month=-1&tagfilter=&hide_patrol_log=1 I have fixed some.


Version: 1.18.x
Severity: major

Details

Reference
bz32868
TitleReferenceAuthorSource BranchDest Branch
Add docstrings and minor formatting changesrepos/search-platform/sre/cleanup-flink-object-storage!3bkingdocstringmain
Add kubernetes logicrepos/search-platform/sre/cleanup-flink-object-storage!2bkingk8smain
Add READMErepos/search-platform/sre/cleanup-flink-object-storage!1bkingreadmemain
Customize query in GitLab

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 12:05 AM
bzimport set Reference to bz32868.
bzimport added a subscriber: Unknown Object (MLST).

saibotrash wrote:

Question: how exactly does WM extract? And: I think it should be ignored in such cases.

saibotrash wrote:

Current last 500 uploads by Rotatebot: 1 such a case (0.2 %)

How do we know which one is the 'correct' one?

As an aside, this is an upstream issue, since we don't extract the exif ourselves.

saibotrash wrote:

(In reply to comment #3)

How do we know which one is the 'correct' one?

We do not know - we can just guess or ask the user if we would be an interactive program. ;-) But it seems to be a bad idea to rotate. Do you cross the street if someone tells you "there is no car coming" and another person "there comes a car, stop!"?

(In reply to comment #4)

As an aside, this is an upstream issue, since we don't extract the exif
ourselves.

Which tool and which settings do we use? Is it reported?
At exiftool you need to add parameter -a to get also duplicate tags. If you leave it away it does not output both. Just one - I do not know which one or if it ignores both then.

(In reply to comment #4)

As an aside, this is an upstream issue, since we don't extract the exif
ourselves.

Which tool and which settings do we use? Is it reported?
At exiftool you need to add parameter -a to get also duplicate tags. If you
leave it away it does not output both. Just one - I do not know which one or if
it ignores both then.

We use PHP's exif module (which is a piece of crap for a variety of reasons, and I've contemplated just re-writing its functionality in php more than once).

I think exiftool goes with the first one, and we use the last one, but that's just a guess.

saibotrash wrote:

(In reply to comment #6)
I do now use this:
exiftool -IFD0:Orientation -b -a
Outputs all (-a) tags and therefore provides the full control over interpretation. ;-)
So for Commons the priority is maybe not more "high major".

saibotrash wrote:

In case it is interesting for someone: Current rate in Rotatebot's uploads: 0.5 % (out of 840 images). Until now all images had "Quicktime" in their EXIF info.

Aklapper changed the subtype of this task from "Task" to "Bug Report".Feb 6 2022, 7:18 PM
Aklapper removed a subscriber: wikibugs-l-list.