Hi all,
I'm having problems getting anything out of getimagesize. I have a small array of images that I loop through to grab the image and then resize it (simply through the <img> width & height tags). Problem is, I get absolutely nothing out of getimagesize or even the imagesx() & imagesy() with gd enabled. I've validated that the strings coming out of the arrays point to valid urls that pull up the images just fine. The loop below works just fine as well if I don't try to resize the image to fit the output properly.
Here's the basic code:
// Print the images -- $currentImage is an array of image urls
$countImages = count($currentImage);
$imgCount = 0;
while ($imgCount < $countImages) {
$image = $currentImage[$imgCount];
//list($width, $height) = getimagesize($image);
$imageSize = getimagesize($image);
$width = $imageSize[0];
$height = $imageSize[1];
$imgRatio = $width/$height;
print('<img class="centerImage" src="'.$image.'" alt="alt text" width="150" height="'.(150*imgRatio).'"/><br />');
$imgCount++;
}
Thanks!