This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Java in General and the fly likes Image background color Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Image background color" Watch "Image background color" New topic
Author

Image background color

ramnna jain
Ranch Hand

Joined: Mar 16, 2009
Posts: 129

I am trying the below code to draw image with setting background color white.
The generated image is an image with black background.

How to overcome this problem?



ramnna jain
Ranch Hand

Joined: Mar 16, 2009
Posts: 129

I tried and getting desired result:


pete stein
Bartender

Joined: Feb 23, 2007
Posts: 1561
I'm no expert in graphics, but I would think that Graphics#clearRect(int x, int y, int width, int height) would be a better choice for filling a region with a background color.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Image background color
 
Similar Threads
How to store what the JPanel draw
Having problem for converting .png image to transparent image
Having problem for converting .png image to transparent image
Images
How to transfer a bufferedImage Object?