public static void displayImageInfo(ImageInfo info) {

    ImageSize size = info.getSize();

    Dimension2D dPt = size.getDimensionPt();
    Dimension dPx = size.getDimensionPx();

    log.debug(
        info.getOriginalURI()
            + " "
            + info.getMimeType()
            + " "
            + Math.round(dPx.getWidth())
            + "x"
            + Math.round(dPx.getHeight()));

    log.debug(
        "Resolution:"
            + Math.round(size.getDpiHorizontal())
            + "x"
            + Math.round(size.getDpiVertical()));
    log.debug(
        "Print size: "
            + Math.round(dPt.getWidth() / 72)
            + "\" x"
            + Math.round(dPt.getHeight() / 72)
            + "\"");
  }
    public static CxCy scale(ImageInfo imageInfo, double xEmu, double yEmu) {
      ImageSize size = imageInfo.getSize();
      double iwEmu = toEmu(size.getWidthPx(), size.getDpiHorizontal());
      double ihEmu = toEmu(size.getHeightPx(), size.getDpiVertical());

      return scaleToFit(iwEmu, ihEmu, xEmu, yEmu);
    }