Since ImageMagick is not available, I have to use GD, but I can't manage to resize a picture with it, it becomes black...
WHY ?
| Code: |
| $image_p = imagecreatetruecolor(640, 480);
list($width, $heigth) = getimagesize($_FILES['picture']['tmp_name']); $image = imagecreatefromjpeg($_FILES['picture']['tmp_name']); imagecopyresampled($image_p, $image, 0, 0, 0, 0, 640, 480, $width, $height); imagejpeg($image_p, $uploadfile, 85); |
WHY ?
