//ImageMagick based routines to create thumbnails function makethumb($origimage,$resizedimage,$thumbtype,$size) { global $original_name; switch ($thumbtype) { case "polaroid": echo "convert -size 400x400 -caption '{$original_name}' $origimage -resize '{$size}x{$size}>' -font Ravie -gravity center -background gray20 -polaroid 0 -quality 50 -depth 8 33.png"; exit; exec("convert -size 400x400 -caption '{$original_name}' $origimage -resize '{$size}x{$size}>' -font Ravie -gravity center -background gray20 -polaroid 0 -quality 50 -depth 8 33.png"); break; case "standard": exec("convert -size 400x400 -caption '{$original_name}' $origimage -resize '{$size}x{$size}>' -font Ravie -quality 50 -depth 8 $resizedimage"); break; } }