Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

retrieve size of an image

 
Venkata Kiran
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am displaying an image in an applet & must display another small image or text on the first image.
How do i get the size of the image being displayed.
 
Ulf Dittmer
Rancher
Pie
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you're using the java.awt.Image or BufferedImage classes to display the image, those have getWidth and getHeight methods.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic