diff --git a/fpdf/fpdf.php b/fpdf/fpdf.php index 05b3f1b..a51c285 100644 --- a/fpdf/fpdf.php +++ b/fpdf/fpdf.php @@ -1443,7 +1443,6 @@ protected function _parsegif($file) ob_start(); imagepng($im); $data = ob_get_clean(); - imagedestroy($im); $f = fopen('php://temp','rb+'); if(!$f) $this->Error('Unable to create memory stream'); diff --git a/scripts/PDFMemImage/README.md b/scripts/PDFMemImage/README.md index 86ea465..acc090b 100644 --- a/scripts/PDFMemImage/README.md +++ b/scripts/PDFMemImage/README.md @@ -81,7 +81,6 @@ imagefilledrectangle($im, 80, 80, 110, 148, $color2); imagefilledrectangle($im, 130, 40, 160, 148, $color3); // Output it $pdf->GDImage($im, 120, 25, 40); -imagedestroy($im); $pdf->Output('F', __DIR__ . '/example.pdf'); ``` diff --git a/scripts/PDFMemImage/ex.php b/scripts/PDFMemImage/ex.php index 1d3dd32..4db3b85 100644 --- a/scripts/PDFMemImage/ex.php +++ b/scripts/PDFMemImage/ex.php @@ -36,6 +36,5 @@ imagefilledrectangle($im, 130, 40, 160, 148, $color3); // Output it $pdf->GDImage($im, 120, 25, 40); - imagedestroy($im); $pdf->Output('F', __DIR__ . '/example.pdf'); diff --git a/scripts/QRcode/QRcode.php b/scripts/QRcode/QRcode.php index 2401f17..cc9bb89 100644 --- a/scripts/QRcode/QRcode.php +++ b/scripts/QRcode/QRcode.php @@ -219,7 +219,6 @@ public function displayPNG($w=100, $background=array(255,255,255), $color=array( header("Content-type: image/png"); imagepng($im); } - imagedestroy($im); return true; } diff --git a/tests/Scripts/PDFMemImageTraitTest.php b/tests/Scripts/PDFMemImageTraitTest.php index 80fa912..5005a12 100644 --- a/tests/Scripts/PDFMemImageTraitTest.php +++ b/tests/Scripts/PDFMemImageTraitTest.php @@ -30,7 +30,6 @@ public function testPDFMemImageTrait () { imagefilledrectangle($im, 80, 80, 110, 148, $color2); imagefilledrectangle($im, 130, 40, 160, 148, $color3); $pdf->GDImage($im, 120, 25, 40); - imagedestroy($im); $this->assertFileCanBeCreated($pdf); diff --git a/tests/test.php b/tests/test.php index 4fec0f3..13e7f59 100644 --- a/tests/test.php +++ b/tests/test.php @@ -306,7 +306,6 @@ imagefilledrectangle($im, 80, 80, 110, 148, $color2); imagefilledrectangle($im, 130, 40, 160, 148, $color3); $pdf->GDImage($im, 120, 25, 40); - imagedestroy($im); //PDFDrawTrait $pdf->SetFont('arial', '', 10);