Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save imbushuo/a05a00f578746cf8ddb36dbbb5e713c0 to your computer and use it in GitHub Desktop.
Save imbushuo/a05a00f578746cf8ddb36dbbb5e713c0 to your computer and use it in GitHub Desktop.
Moegirlpedia Commons image rotation issue investigation draft

Moegirlpedia Commons Image Rotation Issue Investigation

Problem behavior

Some users reported issues while mirroring images from Wikipedia Commons to Mogirlpedia Commons. The image is expected to be "rotated" but actually not. Further tries suggest that certain platforms' behavior handling device position might affect image behavior in Moegirlpedia Commons.

photo_2017-04-01_09-45-39.jpg

Initial investigation

After reviewing these files, we found out that these files have some common issue in their metadata. Size information (width & height) in metadata differs from actual pixel matrix.

photo_2017-04-01_09-51-30.jpg

EXIF information is disregarded by current resize script, hence the problem occurs.

Workaround

Force correct pixel matrix and dispose EXIF information in image processing software like Photoshop.

Update: Further test indicates Microsoft Paint 3D (shipped with Windows 10 Version 1703, aka Creators Update) encounters problems while re-saving such image. Do not use it for this workaround at this moment (17/4/1, not an April Fools joke LOL).

Note

While some portrait image misbehaves as described, some images do things right (metadata matched). It's not clear whether these images have been software-corrected prior to uploading.

Possible Fix

  1. Respect EXIF information in resize script to reduce post-upload work (e.g. resizing in Wikitext/HTML code).
  2. Stay with the status quo because this issue is not related to most images in Moegirlpedia.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment