Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

width and height using image object

 
vidyadhar Joshi
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how to reterive width and height of a gif image using image object.
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you happen to see the getWidth() and getHeight() methods on the Image class in the JavaDocs? They take an ImageObserver as a parameter, but all Components are ImageObservers, so you usually have no problem passing a parameter in. Usually it's a good idea to run your Image through a MediaTracker to make sure it's loaded before trying to get information from it...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic