From d24b4d4a0741e8c158bc7f42c0ec1e178ec51d45 Mon Sep 17 00:00:00 2001 From: nicolaasuni Date: Thu, 3 Apr 2014 20:59:17 +0100 Subject: [PATCH] 6.0.063 (2014-04-03) - Method TCPDF_IMAGES::_parsepng() was fixed to support transparency in Indexed images. --- CHANGELOG.TXT | 3 +++ README.TXT | 4 ++-- composer.json | 2 +- include/tcpdf_images.php | 24 +++++++++++++----------- include/tcpdf_static.php | 2 +- tcpdf.php | 20 ++++++++++---------- 6 files changed, 30 insertions(+), 25 deletions(-) diff --git a/CHANGELOG.TXT b/CHANGELOG.TXT index 8eac585..d0007b4 100644 --- a/CHANGELOG.TXT +++ b/CHANGELOG.TXT @@ -1,3 +1,6 @@ +6.0.063 (2014-04-03) + - Method TCPDF_IMAGES::_parsepng() was fixed to support transparency in Indexed images. + 6.0.062 (2014-03-02) - The method startLayer() now accepts the NULL value for the $print parameter to not set the print layer option. diff --git a/README.TXT b/README.TXT index 7387366..0cb1652 100644 --- a/README.TXT +++ b/README.TXT @@ -8,8 +8,8 @@ http://sourceforge.net/donate/index.php?group_id=128076 ------------------------------------------------------------ Name: TCPDF -Version: 6.0.062 -Release date: 2014-03-02 +Version: 6.0.063 +Release date: 2014-04-03 Author: Nicola Asuni Copyright (c) 2002-2014: diff --git a/composer.json b/composer.json index 0727403..f3181a3 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "tecnick.com/tcpdf", - "version": "6.0.062", + "version": "6.0.063", "homepage": "http://www.tcpdf.org/", "type": "library", "description": "TCPDF is a PHP class for generating PDF documents.", diff --git a/include/tcpdf_images.php b/include/tcpdf_images.php index c1e3141..4e0aba9 100644 --- a/include/tcpdf_images.php +++ b/include/tcpdf_images.php @@ -1,13 +1,13 @@ * @package com.tecnick.tcpdf * @author Nicola Asuni - * @version 1.0.002 + * @version 1.0.003 */ /** @@ -46,7 +46,7 @@ * Static image methods used by the TCPDF class. * @package com.tecnick.tcpdf * @brief PHP class for generating PDF documents without requiring external extensions. - * @version 1.0.002 + * @version 1.0.003 * @author Nicola Asuni - info@tecnick.com */ class TCPDF_IMAGES { @@ -299,14 +299,16 @@ class TCPDF_IMAGES { } elseif ($type == 'tRNS') { // read transparency info $t = TCPDF_STATIC::rfread($f, $n); - if ($ct == 0) { + if ($ct == 0) { // DeviceGray $trns = array(ord($t{1})); - } elseif ($ct == 2) { + } elseif ($ct == 2) { // DeviceRGB $trns = array(ord($t{1}), ord($t{3}), ord($t{5})); - } else { - $pos = strpos($t, chr(0)); - if ($pos !== false) { - $trns = array($pos); + } else { // Indexed + if ($n > 0) { + $trns = array(); + for ($i = 0; $i < $n; ++ $i) { + $trns[] = ord($t{$i}); + } } } fread($f, 4); diff --git a/include/tcpdf_static.php b/include/tcpdf_static.php index faafdba..df20f33 100644 --- a/include/tcpdf_static.php +++ b/include/tcpdf_static.php @@ -55,7 +55,7 @@ class TCPDF_STATIC { * Current TCPDF version. * @private static */ - private static $tcpdf_version = '6.0.062'; + private static $tcpdf_version = '6.0.063'; /** * String alias for total number of pages. diff --git a/tcpdf.php b/tcpdf.php index 74acb26..9aa416f 100644 --- a/tcpdf.php +++ b/tcpdf.php @@ -1,9 +1,9 @@ * @package com.tecnick.tcpdf * @author Nicola Asuni - * @version 6.0.061 + * @version 6.0.063 */ // TCPDF configuration @@ -128,7 +128,7 @@ require_once(dirname(__FILE__).'/include/tcpdf_static.php'); * TCPDF project (http://www.tcpdf.org) has been originally derived in 2002 from the Public Domain FPDF class by Olivier Plathey (http://www.fpdf.org), but now is almost entirely rewritten.
* @package com.tecnick.tcpdf * @brief PHP class for generating PDF documents without requiring external extensions. - * @version 6.0.061 + * @version 6.0.063 * @author Nicola Asuni - info@tecnick.com */ class TCPDF { @@ -10309,7 +10309,7 @@ class TCPDF { /** * Set header font. - * @param $font (array) font + * @param $font (array) Array describing the basic font parameters: (family, style, size). * @public * @since 1.1 */ @@ -10319,7 +10319,7 @@ class TCPDF { /** * Get header font. - * @return array() + * @return array() Array describing the basic font parameters: (family, style, size). * @public * @since 4.0.012 (2008-07-24) */ @@ -10329,7 +10329,7 @@ class TCPDF { /** * Set footer font. - * @param $font (array) font + * @param $font (array) Array describing the basic font parameters: (family, style, size). * @public * @since 1.1 */ @@ -10339,7 +10339,7 @@ class TCPDF { /** * Get Footer font. - * @return array() + * @return array() Array describing the basic font parameters: (family, style, size). * @public * @since 4.0.012 (2008-07-24) */ @@ -23726,8 +23726,8 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: $this->StartTransform(); $x = (isset($attribs['x'])?$attribs['x']:0); $y = (isset($attribs['y'])?$attribs['y']:0); - $w = (isset($attribs['width'])?$attribs['width']:1); - $h = (isset($attribs['height'])?$attribs['height']:1); + $w = 1;//(isset($attribs['width'])?$attribs['width']:1); + $h = 1;//(isset($attribs['height'])?$attribs['height']:1); $tm = TCPDF_STATIC::getTransformationMatrixProduct($tm, array($w, 0, 0, $h, $x, $y)); $this->SVGTransform($tm); $this->setSVGStyles($svgstyle, $prev_svgstyle);