Something like this for image.php...
<?php
// Something here to get the image you need
$image = get_image_function($_GET['user']);
$img_res = imagecreatefromXXXX($image);
header('Content-Type: image/XXX');
imageXXXX($img_res);
imagedestroy($img_res);
?>
The get_image_function is just a dummy example for getting the path of the image you want to use. You replace the XXXX with the image type or set up some if/else cases to handle any image type (JPEG,GIF,PNG,BMP).