Web Design Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignWeb Design Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old November 9th, 2001, 02:30 AM
KamiKiaze KamiKiaze is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2001
Posts: 17 KamiKiaze User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 38 m
Reputation Power: 0
Probably a dumb question

But who knows? ^ ~

In internet explorer when you right click on an image and choose properties, the browser can then tell you the dimensions of the image you are asking about.

My question is can you retrieve that information from an image for use in scripting? Like is there an image.width attribute I can call to in order to get the width of an image, or something like that.

If there is such a way to get dimensions, I'd love to be shown how to retrieve it. *hint hint*

Thanks in advance ^^

Reply With Quote
  #2  
Old November 9th, 2001, 03:01 AM
mbatten mbatten is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2001
Location: Seattle, WA
Posts: 7 mbatten User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
GetImageSize() function

From the php.net website:

The GetImageSize() function will determine the size of any GIF, JPG, PNG or SWF image file and return the dimensions along with the file type and a height/width text string to be used inside a normal HTML IMG tag.

Returns an array with 4 elements. Index 0 contains the width of the image in pixels. Index 1 contains the height. Index 2 a flag indicating the type of the image. 1 = GIF, 2 = JPG, 3 = PNG, 4 = SWF. Index 3 is a text string with the correct "height=xxx width=xxx" string that can be used directly in an IMG tag.


Check out http://www.php.net/manual/en/function.getimagesize.php

Reply With Quote
  #3  
Old November 9th, 2001, 01:17 PM
KamiKiaze KamiKiaze is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2001
Posts: 17 KamiKiaze User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 38 m
Reputation Power: 0
Beautiful, thanks.

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignWeb Design Help > Probably a dumb question


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway