• 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
  • Ron McLeod
  • Paul Clapham
  • Rob Spoor
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Holloway
  • Piet Souris
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Frits Walraven
  • Himai Minh

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: 9625
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 need a new interior decorator. This tiny ad just painted every room in my house purple.
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic