diff --git a/CHANGELOG.TXT b/CHANGELOG.TXT index 25817ba..eab69e2 100755 --- a/CHANGELOG.TXT +++ b/CHANGELOG.TXT @@ -1,3 +1,6 @@ +5.9.164 (2012-06-06) + - A bug introduced on the latest release was fixed. + 5.9.163 (2012-06-05) - Method getGDgamma() was changed. - Rendering performances of PNG images with alpha channel were improved. diff --git a/README.TXT b/README.TXT index 7d1d89e..9ff9a35 100755 --- a/README.TXT +++ b/README.TXT @@ -8,8 +8,8 @@ http://sourceforge.net/donate/index.php?group_id=128076 ------------------------------------------------------------ Name: TCPDF -Version: 5.9.163 -Release date: 2012-06-05 +Version: 5.9.164 +Release date: 2012-06-06 Author: Nicola Asuni Copyright (c) 2002-2012: diff --git a/tcpdf.php b/tcpdf.php index d7a473f..c5c1687 100755 --- a/tcpdf.php +++ b/tcpdf.php @@ -1,9 +1,9 @@ * @package com.tecnick.tcpdf * @author Nicola Asuni - * @version 5.9.163 + * @version 5.9.164 */ // Main configuration file. Define the K_TCPDF_EXTERNAL_CONFIG constant to skip this file. @@ -149,7 +149,7 @@ require_once(dirname(__FILE__).'/config/tcpdf_config.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 5.9.163 + * @version 5.9.164 * @author Nicola Asuni - info@tecnick.com */ class TCPDF { @@ -160,7 +160,7 @@ class TCPDF { * Current TCPDF version. * @private */ - private $tcpdf_version = '5.9.163'; + private $tcpdf_version = '5.9.164'; // Protected properties @@ -8472,21 +8472,21 @@ class TCPDF { * @since 4.3.007 (2008-12-04) */ protected function getGDgamma($c) { - if (!isset($this->gdgammacache[$c])) { + if (!isset($this->gdgammacache["'".$c."'"])) { // shifts off the first 24 bits (where 8x3 are used for each color), // and returns the remaining 7 allocated bits (commonly used for alpha) $alpha = ($c >> 24); // GD alpha is only 7 bit (0 -> 127) $alpha = (((127 - $alpha) / 127) * 255); // correct gamma - $this->gdgammacache[$c] = (pow(($alpha / 255), 2.2) * 255); + $this->gdgammacache["'".$c."'"] = (pow(($alpha / 255), 2.2) * 255); // store the latest values on cache to improve performances if (count($this->gdgammacache) > 8) { // remove one element from the cache array array_shift($this->gdgammacache); } } - return $this->gdgammacache[$c]; + return $this->gdgammacache["'".$c."'"]; } /**