This sounds great! I read info at the link you mentioned, does this sound right?..
Option 1 - Add GetImageSize() to existing code:
// create thumbnail gallery table
echo "<BR><TABLE WIDTH=\"500\" BORDER=\"0\">";
echo "<TR>";
$i=1;
while ($row=mysql_fetch_array($result)) {
$PIC_ID = $row["PIC_ID"];
$TN_ID = $row["TN_ID"];
$PATH1 = $row["PATH1"];
$PATH2 = $row["PATH2"];
if (is_int($i/4)) {
// get thumbnail size and print table row
$size = GetImageSize ("$PATH2$TN_ID");
echo "<TD ALIGN=\"center\" HEIGHT=\"100\"><a href=\"$PATH1$PIC_ID\"><img src=\"$PATH2$TN_ID\" border=\"0\" $size[3]></a></TD></tr><tr>";
}
else {
// get thumbnail size and print table row
$size = GetImageSize ("$PATH2$TN_ID");
echo "<TD ALIGN=\"center\" HEIGHT=\"100\"><a href=\"$PATH1$PIC_ID\"><img src=\"$PATH2$TN_ID\" border=\"0\" $size[3]></a></TD>";
}
$i++;
}
echo "</TR>";
echo "</TABLE>";
option 2 - best option:
Use GetImageSize() when adding new pics and store in database and use something like
<img src=\"$PATH2$TN_ID\" border=\"0\" height=\"$height\" width=\"$width\">
Is that it? Is option 2 faster?
Thanks a mil!
newskool99