Can someone please tell me how I can add a shadow to one of these image options
Thanks
<?php
list($width, $height) = getimagesize($filename);
if($height > $width){
$type = "TALL";
} else {
$type = "WIDE";
}
if($type == "WIDE") {
if ($size =="L") {
header('Content-type: image/jpeg');
list($width, $height) = getimagesize($filename);
$newwidth = "960";
$newheight = "720";
$thumb = imagecreatetruecolor($newwidth, $newheight);
$source = imagecreatefromjpeg($filename);
imagecopyresized($thumb, $source, 0, 0, 0, 0, $newwidth, $newheight, $width, $height);
imagejpeg($thumb);
} elseif ($size == "M") {
$percent = 0.4;
header('Content-type: image/jpeg');
list($width, $height) = getimagesize($filename);
$newwidth = "640";
$newheight = "480";
$thumb = imagecreatetruecolor($newwidth, $newheight);
$source = imagecreatefromjpeg($filename);
imagecopyresized($thumb, $source, 0, 0, 0, 0, $newwidth, $newheight, $width, $height);
imagejpeg($thumb);
} elseif ($size == "S") {
$percent = 0.15;
header('Content-type: image/jpeg');
list($width, $height) = getimagesize($filename);
$newwidth = "240";
$newheight = "180";
$thumb = imagecreatetruecolor($newwidth, $newheight);
$source = imagecreatefromjpeg($filename);
imagecopyresized($thumb, $source, 0, 0, 0, 0, $newwidth, $newheight, $width, $height);
imagejpeg($thumb);
} elseif ($size == "F") {
$percent = 1;
header('Content-type: image/jpeg');
list($width, $height) = getimagesize($filename);
$newwidth = $width * $percent;
$newheight = $height * $percent;
$thumb = imagecreatetruecolor($newwidth, $newheight);
$source = imagecreatefromjpeg($filename);
imagecopyresized($thumb, $source, 0, 0, 0, 0, $newwidth, $newheight, $width, $height);
imagejpeg($thumb);
}
} else {
if ($size =="L") {
$percent = 0.6;
header('Content-type: image/jpeg');
list($width, $height) = getimagesize($filename);
$newwidth = "720";
$newheight = "960";
$thumb = imagecreatetruecolor($newwidth, $newheight);
$source = imagecreatefromjpeg($filename);
imagecopyresized($thumb, $source, 0, 0, 0, 0, $newwidth, $newheight, $width, $height);
imagejpeg($thumb);
} elseif ($size == "M") {
$percent = 0.4;
header('Content-type: image/jpeg');
list($width, $height) = getimagesize($filename);
$newwidth = "480";
$newheight = "640";
$thumb = imagecreatetruecolor($newwidth, $newheight);
$source = imagecreatefromjpeg($filename);
imagecopyresized($thumb, $source, 0, 0, 0, 0, $newwidth, $newheight, $width, $height);
imagejpeg($thumb);
} elseif ($size == "S") {
$percent = 0.15;
header('Content-type: image/jpeg');
list($width, $height) = getimagesize($filename);
$newwidth = "180";
$newheight = "240";
$thumb = imagecreatetruecolor($newwidth, $newheight);
$source = imagecreatefromjpeg($filename);
imagecopyresized($thumb, $source, 0, 0, 0, 0, $newwidth, $newheight, $width, $height);
imagejpeg($thumb);
} elseif ($size == "F") {
$percent = 1;
header('Content-type: image/jpeg');
list($width, $height) = getimagesize($filename);
$newwidth = $width * $percent;
$newheight = $height * $percent;
$thumb = imagecreatetruecolor($newwidth, $newheight);
$source = imagecreatefromjpeg($filename);
imagecopyresized($thumb, $source, 0, 0, 0, 0, $newwidth, $newheight, $width, $height);
imagejpeg($thumb);
}
}
?>