Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => General

Graphics file, width and height...?

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

Graphics file, width and height...?

Postby eyewoo » Sat Mar 15, 2003 8:07 am

Is there a way to determine a graphics file's width and height if only its filename and location are known?
eyewoo
New php-forum User
New php-forum User
 
Posts: 71
Joined: Sun Mar 09, 2003 10:29 am
Location: Pennsylvania, USA

Postby pootergeist » Sat Mar 15, 2003 9:57 am

$a = getimagesize('filename');

$a[0] = the width;
$a[1] = the height;

$a[3] = a string - 'width="XX" height="YY"';

$a[2] would return a numeric that referenced the filetype.
pootergeist
New php-forum User
New php-forum User
 
Posts: 191
Joined: Wed Jan 29, 2003 7:11 am
Location: UK

Postby eyewoo » Sun Mar 16, 2003 6:31 am

thankee pootergeist... I just started with PHP last week. I'm an illustrator, so I wanted to convert my site to PHP. So far it's been a great experience. I put the first version up last night. It's at http://www.eyewoo.com .

All the thumbnails and image files are in arrays, so my illustrations can be added and removed by just adding or subtracting elements in the arrays - i.e. changing a line of code. WOW! Love it!

Right now I'm pretty much on the receiving end of the PHP info stream, but in a few months, I ought to be able to help some people as well... 8)

Thanks again...
eyewoo
New php-forum User
New php-forum User
 
Posts: 71
Joined: Sun Mar 09, 2003 10:29 am
Location: Pennsylvania, USA

Postby Redcircle » Mon Mar 17, 2003 4:21 pm

wow.. you really have some nice illustrations. welcome to the world of PHP.
User avatar
Redcircle
Moderator
Moderator
 
Posts: 830
Joined: Tue Jan 21, 2003 10:42 pm
Location: Michigan USA

Postby eyewoo » Mon Mar 17, 2003 4:43 pm

Thanks Redcircle... :D

I'm an old freelance programmer. Did a lot of C programming about 12 years ago, so I'm feeling real comfortable with PHP.
eyewoo
New php-forum User
New php-forum User
 
Posts: 71
Joined: Sun Mar 09, 2003 10:29 am
Location: Pennsylvania, USA


Return to PHP coding => General

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.

cron