luckylooke Posted February 3, 2011 Share Posted February 3, 2011 this is the code <?php $image = imagecreatefromjpeg("9t4i_200xX.jpg"); $new_image = imagecreatetruecolor(120,90); imagecopyresampled($new_image, $image, 0, 0, 0, 0, 120, 90, imagesx($image), imagesy($image)); $image = $new_image; imagejpeg($image,"images/test.jpg"); ?> result is black jpeg image of size 120,90 I dont understand where could be the problem SimpleImage.php script doesnt work either Quote Link to comment Share on other sites More sharing options...
luckylooke Posted February 6, 2011 Author Share Posted February 6, 2011 this is the code <?php $image = imagecreatefromjpeg("9t4i_200xX.jpg"); $new_image = imagecreatetruecolor(120,90); imagecopyresampled($new_image, $image, 0, 0, 0, 0, 120, 90, imagesx($image), imagesy($image)); $image = $new_image; imagejpeg($image,"images/test.jpg"); ?> result is black jpeg image of size 120,90 I dont understand where could be the problem SimpleImage.php script doesnt work either Really simple solution: $image = imagecreatefromjpeg("images/9t4i_200xX.jpg"); Question is why it did work before... I havent change my code when it stoped working. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.