Uploaded image for project: 'DSpace'
  1. DSpace
  2. DS-3839

Imagemagic thumbnails have the wrong orientation

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 6.0, 6.1, 6.2
    • Fix Version/s: 5.9, 6.3, 7.0
    • Component/s: DSpace API
    • Labels:
      None
    • Attachments:
      0
    • Comments:
      7
    • Documentation Status:
      Not Required

      Description

      By default, ImageMagick does not respect orientation information in an image's EXIF headers. This leads DSpace thumbnails to have an inappropriate orientation, and can be quite troublesome to troubleshoot, as the images "look right" in tools that do honor the EXIF headers. ImageMagick does offer an "auto-orient" flag which "does the right thing", and the wrapper used by DSpace (im4java) does support the auto-orient flag:

      https://github.com/Widen/im4java/blob/90fe3e279bf25f0c9c36b4958d6257211c1553bb/src/org/im4java/core/IMOps.java#L1002-L1021

      A simple addition of this line:

      op.autoOrient();

      to dspace-api/src/main/java/org/dspace/app/mediafilter/ImageMagickThumbnailFilter.java should fix this bug. I've tested this in our staging environment and have confirmed it works. I will submit a PR later today.

      I've marked this for 6x, but it likely affects other versions as well, pretty much any version that has the ImageMagick Thumbnail Filter.

       

        Attachments

          Activity

            People

            Assignee:
            hardyoyo Hardy Pottinger
            Reporter:
            hardyoyo Hardy Pottinger
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: