Z
Zsolt
Hi,
how can I figure out the height and width of an image (gif,jpeg, png etc.)
file?
Zsolt
how can I figure out the height and width of an image (gif,jpeg, png etc.)
file?
Zsolt
how can I figure out the height and width of an image (gif,jpeg, png etc.)
file?
Instead of that I
found an other solution:
ImageIcon image = new ImageIcon(logoTargetFilename);
int width = image.getIconWidth();
int height = image.getIconHeight();
Andrew Thompson said:Image image = Toolkit.getDefaultToolkit().getImage("pretty.gif");
ImageIcon does exactly that thingYou need to use a MediaTracker here to wait for the image to actually
load before calling
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.