Jerome
06-02-2005, 07:49 AM
I'd like the popup window, that you helped me create, to open with the same size as the image it displays.
I thought from reading the code, that by just adding $imagewidth and $imageheight into the javascript, that it would work. But these variables give me the value of the thumbnail size. I thought that they where the original image size, since I think that $displaywidth and $displayheight are there to output the thumbnail size.
I'm working on this inside image.inc.php and
inside function renderListingsImagesJavaRows
I've also experimented with $imagedata[0] and $imagedata[1], but I get the same values as with the rest.
// gotta grab the image size
$imagedata = GetImageSize("$config[listings_upload_path]/$thumb_file_name");
$imagewidth = $imagedata[0];
$imageheight = $imagedata[1];
$shrinkage = $config['thumbnail_width']/$imagewidth;
$displaywidth = $imagewidth * $shrinkage;
$displayheight = $imageheight * $shrinkage;
I thought from reading the code, that by just adding $imagewidth and $imageheight into the javascript, that it would work. But these variables give me the value of the thumbnail size. I thought that they where the original image size, since I think that $displaywidth and $displayheight are there to output the thumbnail size.
I'm working on this inside image.inc.php and
inside function renderListingsImagesJavaRows
I've also experimented with $imagedata[0] and $imagedata[1], but I get the same values as with the rest.
// gotta grab the image size
$imagedata = GetImageSize("$config[listings_upload_path]/$thumb_file_name");
$imagewidth = $imagedata[0];
$imageheight = $imagedata[1];
$shrinkage = $config['thumbnail_width']/$imagewidth;
$displaywidth = $imagewidth * $shrinkage;
$displayheight = $imageheight * $shrinkage;