Ok, all you have to do is to get the image size using
Getimagesize("imagefile.jpg")
array getimagesize ( string filename [, array imageinfo])
The getimagesize() function will determine the size of any GIF, JPG, PNG, SWF, SWC, PSD, TIFF, BMP or IFF image file and return the dimensions along with the file type and a height/width text string to be used inside a normal HTML IMG tag.
Returns an array with 4 elements. Index 0 contains the width of the image in pixels. Index 1 contains the height. Index 2 is a flag indicating the type of the image: 1 = GIF, 2 = JPG, 3 = PNG, 4 = SWF, 5 = PSD, 6 = BMP, 7 = TIFF(intel byte order), 8 = TIFF(motorola byte order), 9 = JPC, 10 = JP2, 11 = JPX, 12 = JB2, 13 = SWC, 14 = IFF. These values correspond to the IMAGETYPE constants that were added in PHP 4.3. Index 3 is a text string with the correct height="yyy" width="xxx" string that can be used directly in an IMG tag. Example 1. getimagesize (file)
here is an example script for you to look at:
<html>
<head>
<title>Document Title</title>
// this is where i set up my pop-up browser function
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}
//-->
</script>
</head>
<body>
// here comes the important bits
<?
$image = Getimagesize("name_of_picture.jpeg");
?>
// this is where i call the browser function, pay attention to where i put the image size variable and which index i call
<a href="#" onClick="MM_openBrWindow('image_window.html','image', <?php $image[3] ?>)">Link</a>
</body>
</html>
and there you go.. you're done.. good luck
Mike