grayscale conversion is built-in with imagefilter().
<?php
/* other code */
$image = imagecreatefromjpeg('some.jpg');
imagefilter($image, IMG_FILTER_GRAYSCALE);
/* other code (ie save) */
imagedestroy($image);
/* other code */
?>
you could create the sepia effect by the following:
<?php
/* other code */
$image = imagecreatefromjpeg('some.jpg');
imagefilter($image, IMG_FILTER_GRAYSCALE);
imagefilter($image, IMG_FILTER_COLORIZE, 112, 66, 20);
//Wikipedia RGB definition of sepia
/* other code (ie save) */
imagedestroy($image);
/* other code */
?>