Here is the outline of the code that doesn't work:
<?php
$startdir = '/home/sites/sitex/web/directory/';
$PicArray = file($startdir . 'pics.txt');
if (!isset($count)) {
$count = 0;
}
$image = $PicArray[$count];
$imagehw = GetImageSize($startdir . $image);
$imagewidth = $imagehw[0];
$imageheight = $imagehw[1];
<img src="/directory/' . $image . ' width=' . $imagewidth . ' height=' . $imageheight . '">
?>
The image specified in the image tag with the variable $image does show up, so I am fairly confident that there is nothing broken in the method for getting the picture. Also remember, that if I put a string (copied from the error message itself) in place of $image, it works fine ($imagehw = GetImageSize($startdir . 'pic.jpg') works fine).