,);">
">
// START Create a thumbnail image t_ProductImageFileName
$sOriginalImageName = str_replace('\\','/', '');
$nScaledWidth = ;
$sThumbImageName = 'Thumbnails/t_' . basename($sOriginalImageName);
if (file_exists($sThumbImageName)) {
echo "
\" />";
} else {
$image = @imagecreatefromjpeg($sOriginalImageName); /* Attempt to open */
if (!$image)
{ /* See if it failed */
echo "
Thumbnail creation error opening: $sOriginalImageName ";
}
else
{
// Get new dimensions
$width = imagesx($image);
$height = imagesy($image);
$t_width = $nScaledWidth;
$t_height = round($height * ($t_width / $width));
// Resample
$thumbimage = imagecreatetruecolor($t_width, $t_height);
imagecopyresampled($thumbimage, $image, 0, 0, 0, 0, $t_width, $t_height, $width, $height);
if ( ! imagejpeg($thumbimage, $sThumbImageName) )
{
echo "Thumbnail image creation failed: $sThumbImageName
";
}
else
{
echo "
\" />";
}
}
}
// END Create a thumbnail image t_ProductImageFileName
"
border="0"
alt="" />