Thread View: borland.public.jbuilder.java.api
2 messages
2 total messages
Started by jony zhang
Wed, 16 Apr 2003 03:00
how to get one image's size (width and height) in java or jsp?
Author: jony zhang
Date: Wed, 16 Apr 2003 03:00
Date: Wed, 16 Apr 2003 03:00
5 lines
1145 bytes
1145 bytes
hi all:
how to get one image's size (width and height) in java or jsp? are there
some APIS to do this? please tell me how to do it.thanks.
jony
Re: how to get one image's size (width and height) in java or jsp?
Author: John McGrath TeamB
Date: Thu, 17 Apr 2003 04:02
Date: Thu, 17 Apr 2003 04:02
18 lines
1502 bytes
1502 bytes
On Wed, 16 Apr 2003 11:00:02 +0800, jony zhang wrote:
> how to get one image's size (width and height) in java or jsp?
> are there some APIS to do this? please tell me how to do it.
You need to make sure that the image has been loaded in order to get
its dimensions. One way to do this is to use a MediaTracker. After it
has been loaded, the getWidth() and getHeight() methods should return
the dimensions of the image.
--
Regards,
John McGrath [TeamB]
---------------------------------------------------
Before sending me e-mail, please read:
http://www.JPMcGrath.net/newsgroups/e-mail.html
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads