I'm having a problem with a BufferedImage that only occurs on Mac OS X (
Java 1.5), works fine on Windows. I have a frame that renders some graphics, it renders fine , but when I try to get a BufferedImage to save the control as a .jpg or to print it, the image is always all black. Here's the code works fine on Windows, the BufferedImage is all black for Mac OS X no matter what:
BufferedImage image=null;
Graphics2D g = (Graphics2D) this.getGraphics();
GraphicsConfiguration gc = g.getDeviceConfiguration();
image = gc.createCompatibleImage(width, height-20);
Graphics gg = image.getGraphics();
gg.translate(0, -50);
paint(gg);
Has anyone else had this type of problem on Mac OS X? Is there a work around? Thanks!
Mark