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

Image cropper improvements

    XMLWordPrintable

Details

    • New Feature
    • Status: Open
    • Normal
    • Resolution: Unresolved
    • None
    • None
    • None
    • 5

    Description

      This issue captures a number of improvements for the CMS image cropper. Essential terminology for the text below:

      • Cropping mask
        The dotted frame that shows what will be in the visible area after a crop
      • Cropping dialog
        The wicket dialog that shows the whole image

       

      Suggested improvements:

      • Position of the cropping mask is by default at 10 pixels from the top left corner of the cropping window. It is tedious for an editor to reposition the mask all the time. The proposal is to either change the initial position to be the center of the image, or save the position coordinates after a crop was done by an editor, and apply those coordinates every time the cropper dialog opens. All the code for this exists, as part of the averages algorithm (see comments below in this Jira issue)
      • Setting the initial position for the cropping mask may appear as not working when an image is too large for the cropping dialog. In that case scrollbars are shown and it may be the case that the cropping mask fall out of this dialog. Proposal to fixing this is to by default enable the 'fit image into view' checkbox. 
      • Allow autocropping of same aspect ratio variants. Proposal is to allow this by adding a checkbox in the cropping dialog, with text like "Auto-crop same aspect ratio variants". Auto-cropping is triggered when editor presses the 'Ok' button
      • Extract the cropping code into a cms service, to be able to use it from any wicket component. Specifically, this is needed to be able to support auto-cropping anr/or calling the cropper from any wicket component (e.g. the upload dialogs or scalingprocessor, needed for CMS-11729). A prerequisite for this was issue CMS-10836 (Pass pluginContext and pluginConfig as constructor arguments to ImageCropEditorDialog)
      • Light refactoring of the ImageCropEditorDialog, to give more meaningful names to variables (also to other classes, replace the word 'thumbnail' with 'variant', e.g. in org.hippoecm.frontend.plugins.gallery.editor.ImageCropPlugin, org.hippoecm.frontend.plugins.gallery.editor.ImageRegeneratePlugin, org.hippoecm.frontend.plugins.gallery.editor.crop.CropBehavior and org.hippoecm.frontend.plugins.gallery.editor.crop.ImageCropSettings. Plus, we could revisit the variable names in the javascript files (hippoimagecropper.js))
      • Consider and investigate moving the cropper out of the product and into a community or enterprise plugin. Or at least make the implementation pluggable so we can replace the ootb cropper with for instance a cloud service (e.g. Cloudinary)

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              mchatzidakis Minos Chatzidakis
              Product Management Team Product Management Team
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: