Image img = manager.getImage(info, ImageFlavor.RENDERED_IMAGE,
userAgent.getImageSessionContext());
assertNotNull("Image must not be null", img);
assertEquals(ImageFlavor.RENDERED_IMAGE, img.getFlavor());
ImageRendered imgRed = (ImageRendered)img;
assertNotNull(imgRed.getRenderedImage());
if (DEBUG_TARGET_DIR != null) {
ImageWriterUtil.saveAsPNG(imgRed.getRenderedImage(),
(int)userAgent.getTargetResolution(),
new File(DEBUG_TARGET_DIR, "out.wmf.png"));
}
assertEquals(3300, imgRed.getRenderedImage().getWidth());
assertEquals(2550, imgRed.getRenderedImage().getHeight());
info = imgRed.getInfo(); //Switch to the ImageInfo returned by the image
assertEquals(792000, info.getSize().getWidthMpt());
assertEquals(612000, info.getSize().getHeightMpt());
}