Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

BufferedImage makes black quadrate instead of picture  RSS feed

 
Bobby Marvikuan
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5167
11
Java Netbeans IDE Opera
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!