VOOZH about

URL: https://phabricator.wikimedia.org/T401677

⇱ ⚓ T401677 [Reparaturhilfe] Investigate Rotatebot


Maniphest T401677

[Reparaturhilfe] Investigate Rotatebot
Closed, ResolvedPublic

Description

Issue

The tool can only rotate JPG and JPEG files, the user also wants to rotate TIFF files. See also the original user request.

Task

We want to investigate if adding support for TIFF files would be an easy change. Otherwise we can not develop new features.

Findings

Summary: The code that the rotationbot is using for rotating PNG files can also be used for rotating TIFF files. Since the maintainer of the code also seems to be active, they could implement this feature on their own. We can bring the request to their attention. It might also be good to create some feature requests to solve the general image rotation issue in a more central way, since it is a well used feature and the bot is not completely dependable.

About the tool

The code

  • Github: rotbot.php
  • Command for rotating JPG/JPEG (see code):
  • Command for rotating PNG and GIF (see code):
  • ImageMagick () can also be used for TIFF files.

General context

Next steps

Event Timeline

Comment Actions

Some review notes:

  • rotatebot's backend uses ExifTool which claims to support TIFF natively, so adding support should be a matter of adding the filetype to existing clauses.
  • TIFF can be rotated by 90° increments by manipulating the tag so no bit arithmetic would be needed for these cases.
  • UploadWizard and VisualEditor run on the MediaWiki app server which can be assumed to already have graphicsmagick (or imagemagick) configured (see https://www.mediawiki.org/wiki/Manual:Image_administration ), which can rotate any format of allowed image.
Comment Actions

It appears like the tool had support for TIFF, but that was removed in 2023 for unknown reasons: https://github.com/toollabs/Rotatebot/commit/c8792123

I currently don't see a reason why that was disabled. I made a pull request: https://github.com/toollabs/Rotatebot/pull/2

Content licensed under Creative Commons Attribution-ShareAlike (CC BY-SA) 4.0 unless otherwise noted; code licensed under GNU General Public License (GPL) 2.0 or later and other open source licenses. By using this site, you agree to the Terms of Use, Privacy Policy, and Code of Conduct. · Wikimedia Foundation · Privacy Policy · Code of Conduct · Terms of Use · Disclaimer · CC-BY-SA · GPL · Credits