I was helped along with this and this is the code being utilized right now:
<?php
$image_path = 'images/RCJ_BlogSite_11.jpg';
$input_image = imagecreatefromjpeg($image_path);
$image_info = getimagesize($image_path);
$output_image = imagecreatetruecolor($image_info[0], $image_info[1] * 2);
imagecopy ($output_image, $input_image, 0, 0, 0, 0, $image_info[0], $image_info[1]);
if(imagefilter($input_image, IMG_FILTER_GRAYSCALE))
{
echo 'Image converted.';
imagecopy ($output_image, $input_image, 0, $image_info[1], 0, 0, $image_info[0], $image_info[1]);
imagejpeg($output_image, 'images/rcj-desaturated-2.jpg');
} else
{
echo 'Conversion failed.';
}
imagedestroy($input_image);
imagedestroy($output_image);
?>
However, the issue I am having is that the greyscale photo is showing up below the colored version in the sprite, I need for it to show up on top with the colored version below it, can you help me figure out what needs to be changed in this script to accomplish that, I have been working on it for a bit but I seem to missing something along the way.
Attached is the way the sprite looks now, I need for it to be the opposite.