make the reader aware that imagecrop() returns a new image and therefore 2 image resources need to be freed after using it.

-- 
Provided by anonymous 82013 ()

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@344273 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Pieter Hordijk 2018-02-16 15:16:47 +00:00
parent 9421e06e34
commit c2b0f6ace4

View file

@ -61,6 +61,8 @@ $im2 = imagecrop($im, ['x' => 0, 'y' => 0, 'width' => $size, 'height' => $size])
if ($im2 !== FALSE) {
imagepng($im2, 'example-cropped.png');
}
imagedestroy($im);
imagedestroy($im2);
?>
]]>
</programlisting>