$image provides a rich set of image manipulation methods that enable you to transform images during report generation. With $image, you can scale, rotate, split, and resize images, include external images, and export them for TXT and HTML templates.

Syntax

These manipulation methods can be broadly divided into seven categories:

  1. Scaling images
  2. Rotating images
  3. Splitting images
  4. Resizing fixed-pixel images
  5. Resizing fixed-measurement images
  6. Including external images
  7. Exporting images for TXT and HTML templates
  8. Limiting image size

Multiple image transformations will have cumulative effects. Desired sizes can be specified either as pixel counts or as measurements in inches, centimeters, or millimeters. While the parameters for resizing an image with a specific measurement (in, cm, mm, pt, or px) must be specified in a pair of quote marks, all other size parameters do not need to be specified in a pair of quote marks.

The keepRatio parameter takes either a true or false value; a true value will resize the image and keep the original image height/width ratio; a false value will only resize one axis, as set by the method name, resulting in a stretched image.