The essence of the question is: I upload a picture to the server, save it for example at $uploadfile='im/20130623134413_2266.jpg';
then I need to reduce this picture, do not make a small copy, namely, reduce the original ....
I found this code, but for some reason it does not plow:
$filename11 = $uploadfile; list($width, $height) = getimagesize($filename11); $new_width = 1024; $new_height = 724; $image_p = imagecreatetruecolor($new_width, $new_height); $image = imagecreatefromjpeg($filename11); imagecopyresampled($image_p, $image, 0, 0, 0, 0, $new_width, $new_height, $width, $height); imagejpeg($image_p, 50); //50% это качество 0-100%
Can someone tell me why it does not work, or knows another solution?