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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

GetImageSize not on some photos

Status
Not open for further replies.

xor

Programmer
Jan 7, 2001
71
NZ
I've got a problem with GetImageSize working on some photos. All my photos are jpgs and it works fine on most of them, but there are a few where it's obviously not returing values for $dimensions (the value should be something like 'width="300" height="400").

$size = GetImageSize($file);
$dimensions = $size[3];
$imageTag = &quot;<img src=\&quot;{$file}\&quot; $dimensions>

Any ideas what might be happening here?



The New Zealand Site
 
I solved the problem. I was giving it a URL based address to the photo, it didn't like that. When I changed it to a relative file path-based path it was ok. The odd thing is it seemed to work for some photos and not others even when it was URL based. Go figure! :/

Thanks!


The New Zealand Site
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top