Page MenuHomePhabricator

API commonmetadata doesn't work on TIFF files?
Open, Needs TriagePublic

Description

Whenever I run an imageinfo / commonmetadata query on a TIFF file, I get empty output. The difference between metadata and commonmetadata isn't entirely clear to me, except that commonmetadata doesn't crash on files like PDFs with gigantic text scans in metadata (T86611).
According to https://commons.wikimedia.org/wiki/Commons:Exif, "To get a unified representation for all formats that matches the JPEG metadata format, use the &iiprop=commonmetadata option.", so I don't see any particular reason why it shouldn't work on TIFF files.

An example file with some metadata: https://commons.wikimedia.org/wiki/File:SouthRiverNJ1936.tiff

metadata API query: https://commons.wikimedia.org/w/api.php?action=query&prop=imageinfo&iiprop=metadata&titles=File:SouthRiverNJ1936.tiff

commonmetadata API query: https://commons.wikimedia.org/w/api.php?action=query&prop=imageinfo&iiprop=commonmetadata&titles=File:SouthRiverNJ1936.tiff

Event Timeline

Ghouston created this task.Mar 21 2017, 4:25 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMar 21 2017, 4:25 AM
Anomie added a subscriber: Anomie.

The API is correctly returning what PagedTiffHandler is returning to it. PagedTiffHandler does not seem to implement getCommonMetaArray().

Anomie removed a subscriber: Anomie.Apr 4 2017, 8:30 PM