Uploaded image for project: 'Hippo CMS'
  1. Hippo CMS
  2. CMS-9135

[Backport CMS7-8372 to 7.9] if image width or height equals that of the variant default cropping window throws an exception

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: 2.26.07, 7.9.3
    • Fix Version/s: 2.26.16
    • Component/s: None
    • Environment:
      gogreen
    • Similar issues:

      Description

      When cropping a variant the top-left corner of the cropping window has a small horizontal and vertical offset (like 10px).
      NS ran into the following issue.

      When uploading an image that has the same height and/or width as a variant's resolution, this causes the cropping window to partially lie outside the image. When clicking okay, the CMS doesn't respond, no alert/error is displayed in the UI and an exception is thrown.

      The issue can be reproduced in the gogreen by uploading any of the attached example images and doing a crop for the "Thumbnail (large)" variant. Don't resize or move the box and click ok. Nothing happens.
      When you try to move the box it snaps back to fit inside the image boundaries.

      Stacktrace:
      Caused by: java.awt.image.RasterFormatException: (x + width) is outside of Raster
      at sun.awt.image.ByteInterleavedRaster.createWritableChild(ByteInterleavedRaster.java:1245)
      at java.awt.image.BufferedImage.getSubimage(BufferedImage.java:1203)
      at org.hippoecm.frontend.plugins.gallery.imageutil.ImageUtils.scaleImage(ImageUtils.java:274)
      at org.hippoecm.frontend.plugins.gallery.editor.ImageCropEditorDialog.onOk(ImageCropEditorDialog.java:238)
      at org.hippoecm.frontend.dialog.AbstractDialog.handleSubmit(AbstractDialog.java:519)
      at org.hippoecm.frontend.dialog.AbstractDialog$2.onSubmit(AbstractDialog.java:277)
      at org.hippoecm.frontend.dialog.ButtonWrapper$1.onSubmit(ButtonWrapper.java:80)
      at org.apache.wicket.ajax.markup.html.form.AjaxButton$1.onSubmit(AjaxButton.java:108)
      at org.apache.wicket.ajax.form.AjaxFormSubmitBehavior$1.onSubmit(AjaxFormSubmitBehavior.java:179)
      at org.apache.wicket.markup.html.form.Form.delegateSubmit(Form.java:1266)
      at org.hippoecm.frontend.dialog.AbstractDialog.delegateSubmit(AbstractDialog.java:527)
      at org.apache.wicket.markup.html.form.Form.process(Form.java:938)
      at org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:770)
      at org.apache.wicket.ajax.form.AjaxFormSubmitBehavior.onEvent(AjaxFormSubmitBehavior.java:156)
      at org.apache.wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java:123)
      at org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest(AbstractDefaultAjaxBehavior.java:626)
      ... 34 more

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                gzur Grzegorz Zur (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: