• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Image width & height return negative

 
Isaac Hewitt
Ranch Hand
Posts: 191
Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


I am getting -1 for both height and width, when in fact the JPG image is quite large
 
Rob Camick
Ranch Hand
Posts: 2613
9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would guess the image hasn't been completely read into memory yet or you specified a bad file name.

You can try using ImageIO, or use a MediaTracker.
 
Isaac Hewitt
Ranch Hand
Posts: 191
Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic