code: public void addToCanvas(float[] tf, com.itextpdf.text.Image img, PdfContentByte canvas) throws DocumentException {
        if (tf == null) {
           canvas.addImage(img);
        } else {
           canvas.addImage(img,
               img.getWidth() * tf[TRANSFORMMATRIX.SCALEX.getIndex()],
               tf[TRANSFORMMATRIX.SHEARX.getIndex()],
               tf[TRANSFORMMATRIX.SHEARY.getIndex()],
               img.getHeight() * tf[TRANSFORMMATRIX.SCALEY.getIndex()],
               img.getAbsoluteX() + tf[TRANSFORMMATRIX.TRANSLATEX.getIndex()],
               img.getAbsoluteY() + tf[TRANSFORMMATRIX.TRANSLATEY.getIndex()]);
        }
        if (getSettings().getBooleanProperty(Boolean.FALSE, ReportConstants.DEBUG) && !isDrawShadow()) {
           if (tf == null) {
              DebugHelper.debugAnnotation(
                  new Rectangle(img.getAbsoluteX(), img.getAbsoluteY(), img.getAbsoluteX() + img.getWidth(), img.getAbsoluteY() + img.getHeight()), getStyleClass(), getWriter());
           } else {
              DebugHelper.debugAnnotation(
                  new Rectangle(
                      img.getAbsoluteX() + tf[TRANSFORMMATRIX.TRANSLATEX.getIndex()],
                      img.getAbsoluteY() + tf[TRANSFORMMATRIX.TRANSLATEY.getIndex()],
                      img.getAbsoluteX() + tf[TRANSFORMMATRIX.TRANSLATEX.getIndex()] + img.getWidth() * tf[TRANSFORMMATRIX.SCALEX.getIndex()],
                      img.getAbsoluteY() + tf[TRANSFORMMATRIX.TRANSLATEY.getIndex()] + img.getHeight() * tf[TRANSFORMMATRIX.SCALEY.getIndex()]
                  ), getStyleClass(), getWriter());
           }
        }
     }
docs: Adds an image to a canvas applying the transform if it is not null. Calls {@link DebugHelper#debugAnnotation(com.itextpdf.text.Rectangle, java.lang.String, com.itextpdf.text.pdf.PdfWriter)
  }.
  
  @param tf may be null, the transform matrix to apply to the image
  @param img
  @param canvas
  @throws DocumentException