This week's book giveaway is in the OCAJP forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide 1Z0-808 and have Jeanne Boyarsky & Scott Selikoff on-line!
See this thread for details.
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 OCA Java SE 8 Programmer I Study Guide 1Z0-808 this week in the OCAJP forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "BufferedImage / getRGB - problem" Watch "BufferedImage / getRGB - problem" New topic
Author

BufferedImage / getRGB - problem

Mindaugas Brazenas
Greenhorn

Joined: Jul 04, 2007
Posts: 2
Hi,
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?

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

Joined: Jan 14, 2004
Posts: 1535
Mindaugas Brazenas
Greenhorn

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

It is working !
 
Don't get me started about those stupid light bulbs.
 
subject: BufferedImage / getRGB - problem