Bump TCPDF from 6.10.1 to 6.11.2

This commit is contained in:
johnnyq
2026-03-07 17:01:53 -05:00
parent 8dbbef37bb
commit ffb97006ec
27 changed files with 153 additions and 124 deletions

View File

@@ -5,9 +5,9 @@
// Begin : 2002-08-03
// Last Update : 2014-11-15
// Author : Nicola Asuni - Tecnick.com LTD - www.tecnick.com - info@tecnick.com
// License : GNU-LGPL v3 (http://www.gnu.org/copyleft/lesser.html)
// License : GNU-LGPL v3 (https://www.gnu.org/copyleft/lesser.html)
// -------------------------------------------------------------------
// Copyright (C) 2002-2014 Nicola Asuni - Tecnick.com LTD
// Copyright (C) 2002-2026 Nicola Asuni - Tecnick.com LTD
//
// This file is part of TCPDF software library.
//
@@ -126,7 +126,9 @@ class TCPDF_IMAGES {
// create temporary PNG image
imagepng($image, $tempfile);
// remove image from memory
imagedestroy($image);
if (PHP_VERSION_ID < 80000) {
imagedestroy($image);
}
// get PNG image data
$retvars = self::_parsepng($tempfile);
// tidy up by removing temporary image
@@ -145,7 +147,9 @@ class TCPDF_IMAGES {
*/
public static function _toJPEG($image, $quality, $tempfile) {
imagejpeg($image, $tempfile, $quality);
imagedestroy($image);
if (PHP_VERSION_ID < 80000) {
imagedestroy($image);
}
$retvars = self::_parsejpeg($tempfile);
// tidy up by removing temporary image
unlink($tempfile);
@@ -270,12 +274,12 @@ class TCPDF_IMAGES {
return 'pngalpha';
}
if (ord(fread($f, 1)) != 0) {
// Unknown compression method
// Unknownn compression method
fclose($f);
return false;
}
if (ord(fread($f, 1)) != 0) {
// Unknown filter method
// Unknownn filter method
fclose($f);
return false;
}
@@ -327,7 +331,7 @@ class TCPDF_IMAGES {
}
// get compression method
if (ord(fread($f, 1)) != 0) {
// Unknown filter method
// Unknownn filter method
fclose($f);
return false;
}