An error appears: WARNING: imagedestroy(): 31 is not a valid Image resource color_old.php on line 15. Line 15 is the last line in the code snippet
Code: Select all
/*standard code for creating image using the dimensions of the old one*/
$new=colorOld($old, $color); //colorOld uses the old technique for coloring images
imagejpg($new, 100);
imagedestroy($old);
imagedestroy($new);
If I turn off the error message the obtained image is displayed correctly.