Uploaded image for project: 'CMS'
  1. CMS
  2. CMS-1978

Image helpers improvements

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Duplicate
    • Icon: Major Major
    • 4.2.0
    • 3.0
    • Plugin : Web
    • None

      Ticket CMS-1267 asked for the possibility to resize an image keeping the aspect ratio, to fit in a rectangle with specified maximum dimensions.

      The former has been done, the latter doesn't really work as it could be expected: the image is resized and the aspect ratio is kept, whatever the image is larger than the given max dimensions (scaled down, OK), or already fits in the given dimensions (upscaled, not OK).

      The helper signature is "resolveBoundedImage(imageType, imagePath, maxWidth, maxHeight)": "maxWidth" and "maxHeight" names let the user think that an image won't be upscaled...

      So either all the names aren't what they seem to point out and should be changed, or the helper behavior should be modified.
      Maybe more helpers or more parameters should be added ? Raphaël's propositions were a good start...

            Unassigned Unassigned
            ngavalda Nicolas Gavalda (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: