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;
RenderedImage renImg = imgRed.getRenderedImage();
assertNotNull(renImg);
if (DEBUG_TARGET_DIR != null) {
ImageWriterUtil.saveAsPNG(renImg,
(int)userAgent.getTargetResolution(),
new File(DEBUG_TARGET_DIR, "images.svg.png"));
}
assertEquals(400, renImg.getWidth());
assertEquals(400, renImg.getHeight());
info = imgRed.getInfo(); //Switch to the ImageInfo returned by the image
assertEquals(400000, info.getSize().getWidthMpt());
assertEquals(400000, info.getSize().getHeightMpt());
Raster raster = renImg.getData();
// This pixel is white
int[] pixel1 = raster.getPixel(1, 1, (int[] )null);