|
minor correction
it should read imagejpeg($newimg) at the end of the code snippet.
to write to a file remove the header("content-type: image/jpeg");
and change imagejpeg($newimg) to imagejpeg($newimg,"some/image/path");
you'd want to do any other transformations after the imagecopyresampled function.
|