Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-20532

Server-side image resizing always preserves the aspect ratio

    XMLWordPrintable

Details

    • Unit
    • Unknown
    • N/A
    • N/A
    • Pull Request accepted

    Description

      Steps to reproduce:

      Open <xwiki-host>/xwiki/bin/download/Sandbox/WebHome/XWikiLogo.png?width=40&height=10&rev=1.1 where <xwiki-host> is the URL of your XWiki installation.

      Expected result:

      An image of width 40 and height 10 is displayed.

      Actual result:

      An quadratic image of width and height 10 is displayed.

      This demonstrates that the aspect ratio is preserved even when not requested. This is because the ThumbnailatorImageProcessor always preserves the aspect ratio so this is a regression introduce as part of fixing XWIKI-7623 in XWiki 8.4.4 and 9.0 RC1. I'm not marking this as a blocker as the regression is old.

      This may result in pixelated images and might thus be one cause of XWIKI-19220. Fixing this would also partially fix XWIKI-20499 at least when the desired image dimensions are smaller than the original image.

      Attachments

        Issue Links

          Activity

            People

              MichaelHamann Michael Hamann
              MichaelHamann Michael Hamann
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: