aspose file tools
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
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Reply 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: 4163
    
    3

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://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: BufferedImage makes black quadrate instead of picture
 
Similar Threads
BufferedImage to ServletOutputStream: Black Box
Java 2D Border Issue
where does BufferedImage save files?
Null pointer exception in g.drawImage(.....)
Writing Image onto a WordDoc