• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

BufferedImage problem Mac OS X

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please do not post the same question more than once. It causes confusion and duplication of effort as the community tries to help everyone.
 
I'm doing laundry! Look how clean this tiny ad is:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic