I found the answer to my own question on php.net. Here is a link to Ashley's write-up:
http://php.net/manual/pl/book.image.php
Thanks Ashley!
For completeness, I will also summarize how to accomplish this here...
Apparently. there is no built-in function to convert a GD image resource to a string, so Ashley accomplished this by writing the image out to the output buffer. Sample code is:
// start output buffering
op_start();
// write the image to the output buffer the same way you would write to a file
imagejpeg($my_resized_image);
// copy the contents of the output buffer to a string variable and stop buffering
$my_image_string = ob_get_clean();
The imagejpeg function expects a filename for the second parameter. If it is null, the raw image stream is outputted directly. Since we first turned on output buffering, the image stream is outputted to the output buffer.
Once we have the image in a string variable we can easily insert it into the MySQL database using the addslashes function:
$sql = "insert into my_image_table(image_id, image) values(" . $img_id;
$sql .= ", \"" . addslashes($my_image_string) . "\")";