permaculture playing cards*
The moose likes Swing / AWT / SWT and the fly likes BufferedImage makes black quadrate instead of picture 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 » Swing / AWT / SWT
Bookmark "BufferedImage makes black quadrate instead of picture" Watch "BufferedImage makes black quadrate instead of picture" New topic
Author

BufferedImage makes black quadrate instead of picture

Bobby Marvikuan
Ranch Hand

Joined: Mar 14, 2012
Posts: 54
can anyone help to spot my mistake?
I have a code and exactly in this code somewhere is mistake because it saves black image
here is code:

is it because of TYPE_INT_RGB?
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4523
    
    5

You didn't draw anything to the BufferedImage. What did you expect?

edit: Unrelated, but don't get into the habit of coding empty catch blocks. At the very least, print the Exception's stack trace.


luck, db
There are no new questions, but there may be new answers.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: BufferedImage makes black quadrate instead of picture
 
Similar Threads
Null pointer exception in g.drawImage(.....)
Java 2D Border Issue
BufferedImage to ServletOutputStream: Black Box
where does BufferedImage save files?
Writing Image onto a WordDoc