code: public String getPreviewScaleParam(int imageHeight, int imageWidth) {
  
          int maxHeight = m_previewDialog.getPreviewHeight() - 4;
          int maxWidth = m_previewDialog.getDialogWidth() - 10;
          if (m_croppingParam != null) {
              return m_croppingParam.getRestrictedSizeScaleParam(maxHeight, maxWidth);
          }
          if ((imageHeight <= maxHeight) && (imageWidth <= maxWidth)) {
              return ""; // dummy parameter, doesn't actually do anything
          }
          CmsCroppingParamBean restricted = new CmsCroppingParamBean();
          restricted.setTargetHeight(imageHeight > maxHeight ? maxHeight : imageHeight);
          restricted.setTargetWidth(imageWidth > maxWidth ? maxWidth : imageWidth);
          return restricted.toString();
      }
docs: Returns the cropping parameter.<p>
  
  @param imageHeight the original image height
  @param imageWidth the original image width
  
  @return the cropping parameter