File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Swing / AWT / SWT and the fly likes BufferedImage / getRGB - problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Customer Requirements for Developers this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "BufferedImage / getRGB - problem" Watch "BufferedImage / getRGB - problem" New topic

BufferedImage / getRGB - problem

Mindaugas Brazenas

Joined: Jul 04, 2007
Posts: 2
What I want to do is to draw to BufferedImage via Graphics2D, and then copy all image by pixel. What I need is an ability to get pixel's color and it seems to work, but at least not in the way I suppose... There is the piece of code:

I draw something, but what I got is black! ( "0 / 0 / 0" )

What I am doing wrong here?

[ July 04, 2007: Message edited by: Mindaugas Brazenas ]
Craig Wood
Ranch Hand

Joined: Jan 14, 2004
Posts: 1535
Mindaugas Brazenas

Joined: Jul 04, 2007
Posts: 2
Thank you!

It is working !
I agree. Here's the link:
subject: BufferedImage / getRGB - problem
It's not a secret anymore!