Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

size of an image

Status
Not open for further replies.

Bri123456

Programmer
Jan 3, 2002
30
0
0
CA
Hi I've been looking everywhere but I cannot find out how to get the dimensions of an image. Is there some script that I can write to return the width and height of an image. (i.e. w = pic.width; h = pic.height;) thanks for any help with this.
 
thread216-516735 _________________________________________________________
for the best results to your questions: FAQ333-2924
[sub]01001111 01101110 01110000 01101110 01110100[/sub]
onpnt2.gif
[sup] [/sub]
 
Near the bottom of
thread215-515515
is a script on dynamically changing image height and width. That might be useful.

Cheers,
[monkey] Edward [monkey]

"Cut a hole in the door. Hang a flap. Criminy, why didn't I think of this earlier?!" -- inventor of the cat door
 
Thanks for the quick response, but for the first person who replied, can I use this if i pass the image name back to the function for my open scipt, or can it be used in the function call (i.e. a href = "javascript:eek:penNew('cat.jpg') then in the function

function openNew (imgName)
var h = imgName.height

Sorry for the confusion but I am just teching my self this stuff as I go
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top