I was looking at DeviantArt the other day, and I noticed that every image had a really cool shadow behind it. I opened up the link to the background image (http://sh.deviantart.com/shadow/alpha-000000/5.1-0.6/180/150/logo.png), and I noticed a really cool script that they had on their site and thought I would try to do something like that myself. Notice if you change the two numbers before logo.png, it will automatically change the size of the logo.
I tried to use GD for a while, but I'm only on PHP 4, so I don't have any way to blur an image without a complicated script. I finally went to imagemagick, and here's what I came up with:
header("Content-type: image/png");
$pad = 15;
$img_x = $_GET['x'] ? $_GET['x'] + 12 : 200;
$img_y = $_GET['y'] ? $_GET['y'] + 12 : 200;
$size = $img_x.'x'.$img_y;
$rect = ($pad/2).','.($pad/2).' '.($img_x - $pad/2).','.($img_y - $pad/2);
passthru('convert gray: -fill "#bbb" -size '.$size.' xc:white -draw "rectangle '.$rect.'" -gaussian 0x1.4 png:-');
But it seems to be really slow, which I think is because of the gaussian blur. It would be good if I could cache the image, but I don't want to fill up my web space with images (less than 3kb a piece though).
I was planning on trying to submit the idea back to the image module, but storing the images really isn't feasible, and it needs to be fast before it can be used.