You should have got a message ("NYI: drawImage") on System.err when you called that method. It's simply not implemented, yet. Try graphics.drawImage(image, 0, 0, null); instead. EPSDocumentGraphics2D is only implemented as far as it was needed for FOP and Batik. It's not yet a full implementation.
Jeremias Maerki On 05.10.2007 14:19:09 Alexander Braun wrote: > Hello, > > I am using xmlgraphics-commons-1.2-bin-jdk1.4 and I try to convert gif > or png images to eps images. > > I'm doing the following: > > BufferedImage image = ImageIO.read(imageFile); > EPSDocumentGraphics2D graphics = new EPSDocumentGraphics2D(false); > File outps = new File("/home/alexander/tmp/java2d/out.ps"); > FileOutputStream out = new FileOutputStream(outps); > > graphics.setGraphicContext(new GraphicContext()); > graphics.setupDocument(out, 400, 400); > boolean ready=graphics.drawImage(image, 0, 0, Color.CYAN, null); > System.out.println("ready drawn: " + ready); > graphics.finish(); > > In the generated out.ps no image can be seen, though the > background-color is set in the rectangle where I would expect my image. > > * Drawing primitves like GeneralPaths works perfectly in this scenario. > * Drawing the image on a standard Frame->Graphics also works perfectly > and the image is shown in the frame > * the drawImage returns true, so everything should be rendered > * I've got the same result, when defining an ImageObserver instead of > null > > Could anybody help me please, and tell me what I`m doing wrong here, > because I'm already hitting my head against the wall. > > best regards > Alexander --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]