Updating TCPDF library

This commit is contained in:
Manuel Cillero 2017-08-10 22:10:45 +02:00
parent 1a57ad7292
commit 052824e4b7
28 changed files with 33338 additions and 968 deletions

View file

@ -160,6 +160,14 @@ class TCPDF_IMAGES {
* @public static
*/
public static function _parsejpeg($file) {
// check if is a local file
if (!@file_exists($file)) {
// try to encode spaces on filename
$tfile = str_replace(' ', '%20', $file);
if (@file_exists($tfile)) {
$file = $tfile;
}
}
$a = getimagesize($file);
if (empty($a)) {
//Missing or incorrect image file
@ -289,8 +297,8 @@ class TCPDF_IMAGES {
$trns = '';
$data = '';
$icc = false;
$n = TCPDF_STATIC::_freadint($f);
do {
$n = TCPDF_STATIC::_freadint($f);
$type = fread($f, 4);
if ($type == 'PLTE') {
// read palette
@ -338,6 +346,7 @@ class TCPDF_IMAGES {
} else {
TCPDF_STATIC::rfread($f, $n + 4);
}
$n = TCPDF_STATIC::_freadint($f);
} while ($n);
if (($colspace == 'Indexed') AND (empty($pal))) {
// Missing palette