At first I thougth this was very simple, but it appears that imagejpeg, imagegif, imagepng, etc, only dumps directly to a browser or file -- it won't return the image as a string. I've also tried referring to the image pointer
$im=imagecreatefromstring(file_get_contents($_FILES['userfile']['tmp_name'])); ... resize image ... mysql_query("INSERT INTO `table` (`image`) VALUES ('".mysql_real_escape_string($im)."')");without success
It looks like I will need to write the image to a file, then reload the file using file_get_contents. Is there a shorter method?