File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Applets and the fly likes retrieve size of an image Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Applets
Bookmark "retrieve size of an image" Watch "retrieve size of an image" New topic

retrieve size of an image

Venkata Kiran
Ranch Hand

Joined: Sep 06, 2005
Posts: 30
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

Joined: Mar 22, 2005
Posts: 42965
If you're using the java.awt.Image or BufferedImage classes to display the image, those have getWidth and getHeight methods.
I agree. Here's the link:
subject: retrieve size of an image
jQuery in Action, 3rd edition