File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Image width & height return negative

 
Isaac Hewitt
Ranch Hand
Posts: 191
Netbeans IDE
  • 0
  • 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: 2473
8
  • 0
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic