"Warning: imagejpeg() [function.imagejpeg]: Unable to open 'images/products/test2.jpg' for writing in /usr/local/psa/home/vhosts/lezazou.com/httpdocs/ImageSize.php on line 44"
This is the code I am using:
Code: Select all
<?php
$src_img = imagecreatefromjpeg("images/products/test.jpg");
$dst_img = imagecreate(200,150);
imagecopyresized($dst_img, $src_img, 0, 0, 0, 0, 200, 150, 400, 300);
imagejpeg($dst_img, 'images/products/test2.jpg', '75');
imagedestroy($src_img);
imagedestroy($dst_img);
?>Note: I cannot use imagecreatetruecolor() or imagecopyresample() due to host limations. I understand the resized image will have poor quality.
Any help would be appreciated