CROPRO Documentation: Rendering options

Rendering options

By default CROPRO renders the resulting cropped image in PNG format of the same size you see while editing. However, there are a lot of things you can change in this behavior.

Controlling rendering

You can control rendering results by setting one or more of the following properties:

  • renderAtNaturalSize - when set to true the resulting image will be rendered at the natural (original) target image size irrespectively of the screen size of the image object. Default: false.
  • renderImageType - you can control the resulting image format via this property. By default, it is set to image/png. However, with photo-realistic target images, this could result in large(r) image files. In these cases, you may want to switch to image/jpeg and adjust renderImageQuality for the optimal size/quality.
  • renderImageQuality - when renderImageType is set to a renderer that supports quality settings, such as image/jpeg, you can set this property to adjust it. For JPEG the value of 0 means the lowest quality and smallest file size, 1 is for the highest quality and the largest file.

The following code instructs CROPRO to render the result as an original size JPEG with 50% quality.

cropArea.renderAtNaturalSize = true; cropArea.renderImageType = 'image/jpeg'; cropArea.renderImageQuality = 0.5;