temporary files never deleted (#263)

When creating PNG files, temporary file are not removed (search for __tcpdf_* in your temp directory). After this changes temp directory never has temporary files created by tcpdf

Co-authored-by: Nicola Asuni <nicolaasuni@users.noreply.github.com>
This commit is contained in:
Dario B 2021-03-27 09:56:08 +01:00 committed by GitHub
parent b34328ae87
commit 7edddd2116
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7365,6 +7365,9 @@ class TCPDF {
$imgmask = $this->Image($tempfile_alpha, $x, $y, $w, $h, 'PNG', '', '', $resize, $dpi, '', true, false);
// embed image, masked with previously embedded mask
$this->Image($tempfile_plain, $x, $y, $w, $h, $type, $link, $align, $resize, $dpi, $palign, false, $imgmask);
// remove temp files
unlink($tempfile_alpha);
unlink($tempfile_plain);
}
/**