diff --git a/CHANGELOG.TXT b/CHANGELOG.TXT
index 8214b15..7c72d2c 100755
--- a/CHANGELOG.TXT
+++ b/CHANGELOG.TXT
@@ -1,3 +1,6 @@
+5.9.014 (2010-11-15)
+ - Bug item #3109464 "QRCode error" was fixed.
+
5.9.013 (2010-11-15)
- Bug item #3109257 "Problem with interlaced GIFs and PNGs" was fixed.
- Image function now accepts image data streams (check example n. 9).
diff --git a/README.TXT b/README.TXT
index 4105e4a..84aa02e 100755
--- a/README.TXT
+++ b/README.TXT
@@ -8,7 +8,7 @@ http://sourceforge.net/donate/index.php?group_id=128076
------------------------------------------------------------
Name: TCPDF
-Version: 5.9.013
+Version: 5.9.014
Release date: 2010-11-15
Author: Nicola Asuni
diff --git a/doc/classtrees_com-tecnick-tcpdf.html b/doc/classtrees_com-tecnick-tcpdf.html
index 1027295..b7eebe6 100644
--- a/doc/classtrees_com-tecnick-tcpdf.html
+++ b/doc/classtrees_com-tecnick-tcpdf.html
@@ -65,7 +65,7 @@
diff --git a/doc/com-tecnick-tcpdf/PDF417.html b/doc/com-tecnick-tcpdf/PDF417.html
index 27701f7..7e7dc10 100644
--- a/doc/com-tecnick-tcpdf/PDF417.html
+++ b/doc/com-tecnick-tcpdf/PDF417.html
@@ -1004,7 +1004,7 @@ $code)
diff --git a/doc/com-tecnick-tcpdf/QRcode.html b/doc/com-tecnick-tcpdf/QRcode.html
index 559b38c..28ef81e 100644
--- a/doc/com-tecnick-tcpdf/QRcode.html
+++ b/doc/com-tecnick-tcpdf/QRcode.html
@@ -5552,7 +5552,7 @@ $frame)
diff --git a/doc/com-tecnick-tcpdf/TCPDF.html b/doc/com-tecnick-tcpdf/TCPDF.html
index 31b58b7..5b510c8 100644
--- a/doc/com-tecnick-tcpdf/TCPDF.html
+++ b/doc/com-tecnick-tcpdf/TCPDF.html
@@ -84,7 +84,7 @@ Source Location: /tcpdf.php
Version:
@@ -783,7 +783,7 @@ This is a PHP class for generating PDF documents without requiring external exte
author: | Nicola Asuni - info@tecnick.com |
- version: | 5.9.013 |
+ version: | 5.9.014 |
link: | http://www.tcpdf.org |
@@ -6337,7 +6337,7 @@ This is a PHP class for generating PDF documents without requiring external exte
- $tcpdf_version = '5.9.013'
+ $tcpdf_version = '5.9.014'
[line 164]
Tags:
@@ -28384,7 +28384,7 @@ $file)
diff --git a/doc/com-tecnick-tcpdf/TCPDF2DBarcode.html b/doc/com-tecnick-tcpdf/TCPDF2DBarcode.html
index 75b7026..bf4d3a4 100644
--- a/doc/com-tecnick-tcpdf/TCPDF2DBarcode.html
+++ b/doc/com-tecnick-tcpdf/TCPDF2DBarcode.html
@@ -300,7 +300,7 @@ $type)
diff --git a/doc/com-tecnick-tcpdf/TCPDFBarcode.html b/doc/com-tecnick-tcpdf/TCPDFBarcode.html
index b2ca42c..e1f8ff3 100644
--- a/doc/com-tecnick-tcpdf/TCPDFBarcode.html
+++ b/doc/com-tecnick-tcpdf/TCPDFBarcode.html
@@ -1378,7 +1378,7 @@ $type)
diff --git a/doc/com-tecnick-tcpdf/TCPDF_UNICODE_DATA.html b/doc/com-tecnick-tcpdf/TCPDF_UNICODE_DATA.html
index 6a301e9..0676542 100644
--- a/doc/com-tecnick-tcpdf/TCPDF_UNICODE_DATA.html
+++ b/doc/com-tecnick-tcpdf/TCPDF_UNICODE_DATA.html
@@ -18704,7 +18704,7 @@ This is a PHP class containing Unicde data for TCPDF library
- Documentation generated on Mon, 15 Nov 2010 10:34:14 +0100 by phpDocumentor 1.4.3
+ Documentation generated on Mon, 15 Nov 2010 14:09:27 +0100 by phpDocumentor 1.4.3
diff --git a/doc/com-tecnick-tcpdf/_2dbarcodes.php.html b/doc/com-tecnick-tcpdf/_2dbarcodes.php.html
index 22cc13a..75d1cba 100644
--- a/doc/com-tecnick-tcpdf/_2dbarcodes.php.html
+++ b/doc/com-tecnick-tcpdf/_2dbarcodes.php.html
@@ -106,7 +106,7 @@ PHP class to creates array representations for 2D barcodes to be used with TCPDF
diff --git a/doc/com-tecnick-tcpdf/_barcodes.php.html b/doc/com-tecnick-tcpdf/_barcodes.php.html
index 3ca8d40..a4fd1bc 100644
--- a/doc/com-tecnick-tcpdf/_barcodes.php.html
+++ b/doc/com-tecnick-tcpdf/_barcodes.php.html
@@ -106,7 +106,7 @@ PHP class to creates array representations for common 1D barcodes to be used wit
diff --git a/doc/com-tecnick-tcpdf/_config---tcpdf_config.php.html b/doc/com-tecnick-tcpdf/_config---tcpdf_config.php.html
index a618cbc..d1adf97 100644
--- a/doc/com-tecnick-tcpdf/_config---tcpdf_config.php.html
+++ b/doc/com-tecnick-tcpdf/_config---tcpdf_config.php.html
@@ -543,7 +543,7 @@ Configuration file for TCPDF.
diff --git a/doc/com-tecnick-tcpdf/_htmlcolors.php.html b/doc/com-tecnick-tcpdf/_htmlcolors.php.html
index 450b3e4..b01cfca 100644
--- a/doc/com-tecnick-tcpdf/_htmlcolors.php.html
+++ b/doc/com-tecnick-tcpdf/_htmlcolors.php.html
@@ -98,7 +98,7 @@ Array of WEB safe colors
diff --git a/doc/com-tecnick-tcpdf/_pdf417.php.html b/doc/com-tecnick-tcpdf/_pdf417.php.html
index a6b2b15..8d5a00d 100644
--- a/doc/com-tecnick-tcpdf/_pdf417.php.html
+++ b/doc/com-tecnick-tcpdf/_pdf417.php.html
@@ -158,7 +158,7 @@ Class to create PDF417 barcode arrays for TCPDF class.
PDF417 (ISO
diff --git a/doc/com-tecnick-tcpdf/_qrcode.php.html b/doc/com-tecnick-tcpdf/_qrcode.php.html
index 412deda..35424af 100644
--- a/doc/com-tecnick-tcpdf/_qrcode.php.html
+++ b/doc/com-tecnick-tcpdf/_qrcode.php.html
@@ -83,7 +83,7 @@ Class to create QR-code arrays for TCPDF class.
QR Code symbol is
author: | Nicola Asuni |
- version: | 1.0.006 |
+ version: | 1.0.007 |
copyright: | 2010-2010 Nicola Asuni - Tecnick.com S.r.l (www.tecnick.com) Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com |
@@ -481,7 +481,7 @@ string $string, [int $split_length = 1])
diff --git a/doc/com-tecnick-tcpdf/_tcpdf.php.html b/doc/com-tecnick-tcpdf/_tcpdf.php.html
index 70f5342..b498867 100644
--- a/doc/com-tecnick-tcpdf/_tcpdf.php.html
+++ b/doc/com-tecnick-tcpdf/_tcpdf.php.html
@@ -83,7 +83,7 @@ This is a PHP class for generating PDF documents without requiring external exte
author: | Nicola Asuni |
- version: | 5.9.013 |
+ version: | 5.9.014 |
copyright: | 2002-2010 Nicola Asuni - Tecnick.com S.r.l (www.tecnick.com) Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com |
@@ -110,7 +110,7 @@ main configuration file
(define the K_TCPDF_EXTERNAL_CONFIG consta
diff --git a/doc/com-tecnick-tcpdf/_unicode_data.php.html b/doc/com-tecnick-tcpdf/_unicode_data.php.html
index 458be56..63db6f0 100644
--- a/doc/com-tecnick-tcpdf/_unicode_data.php.html
+++ b/doc/com-tecnick-tcpdf/_unicode_data.php.html
@@ -103,7 +103,7 @@ Unicode data class for TCPDF library.
diff --git a/doc/elementindex.html b/doc/elementindex.html
index 613016e..ce70599 100644
--- a/doc/elementindex.html
+++ b/doc/elementindex.html
@@ -2138,7 +2138,7 @@
top
diff --git a/doc/elementindex_com-tecnick-tcpdf.html b/doc/elementindex_com-tecnick-tcpdf.html
index 4ef7aca..299ea48 100644
--- a/doc/elementindex_com-tecnick-tcpdf.html
+++ b/doc/elementindex_com-tecnick-tcpdf.html
@@ -2171,7 +2171,7 @@
top
diff --git a/doc/errors.html b/doc/errors.html
index cbffe2d..28bf050 100644
--- a/doc/errors.html
+++ b/doc/errors.html
@@ -35,7 +35,7 @@
Post-parsing
diff --git a/doc/index.html b/doc/index.html
index 4fbca19..92ac373 100644
--- a/doc/index.html
+++ b/doc/index.html
@@ -68,7 +68,7 @@
This documentation was generated by phpDocumentor v1.4.3
diff --git a/doc/li_com-tecnick-tcpdf.html b/doc/li_com-tecnick-tcpdf.html
index 4fbca19..92ac373 100644
--- a/doc/li_com-tecnick-tcpdf.html
+++ b/doc/li_com-tecnick-tcpdf.html
@@ -68,7 +68,7 @@
This documentation was generated by phpDocumentor v1.4.3
diff --git a/qrcode.php b/qrcode.php
index 636b07e..7d748a7 100644
--- a/qrcode.php
+++ b/qrcode.php
@@ -1,9 +1,9 @@
appendNum($inputitem['bstream'], 4, 0x02);
$inputitem['bstream'] = $this->appendNum($inputitem['bstream'], $this->lengthIndicator(QR_MODE_AN, $version), $inputitem['size']);
for ($i=0; $i < $words; ++$i) {
- $val = (int)$this->lookAnTable(ord($inputitem['data'][$i*2 ])) * 45;
- $val += (int)$this->lookAnTable(ord($inputitem['data'][$i*2+1]));
+ $val = (int)($this->lookAnTable(ord($inputitem['data'][$i*2])) * 45);
+ $val += (int)($this->lookAnTable(ord($inputitem['data'][($i*2)+1])));
$inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 11, $val);
}
if ($inputitem['size'] & 1) {
@@ -1766,7 +1766,7 @@ if (!class_exists('QRcode', false)) {
* @return int number of bits
*/
protected function estimateBitsModeNum($size) {
- $w = (int)$size / 3;
+ $w = (int)ceil($size / 3);
$bits = $w * 10;
switch($size - $w * 3) {
case 1: {
@@ -1814,7 +1814,7 @@ if (!class_exists('QRcode', false)) {
* @return int number of bits
*/
protected function estimateBitsModeAn($size) {
- $w = (int)($size / 2);
+ $w = (int)ceil($size / 2);
$bits = $w * 11;
if ($size & 1) {
$bits += 6;
@@ -1828,7 +1828,7 @@ if (!class_exists('QRcode', false)) {
* @return int number of bits
*/
protected function estimateBitsMode8($size) {
- return $size * 8;
+ return (int)ceil($size * 8);
}
/**
@@ -1837,7 +1837,7 @@ if (!class_exists('QRcode', false)) {
* @return int number of bits
*/
protected function estimateBitsModeKanji($size) {
- return (int)(($size / 2) * 13);
+ return (int)ceil(($size / 2) * 13);
}
/**
@@ -2070,7 +2070,7 @@ if (!class_exists('QRcode', false)) {
$maxwords = $this->getDataLength($this->version, $this->level);
$maxbits = $maxwords * 8;
if ($maxbits == $bits) {
- return 0;
+ return $bstream;
}
if ($maxbits - $bits < 5) {
return $this->appendNum($bstream, $maxbits - $bits, 0);
@@ -2331,7 +2331,7 @@ if (!class_exists('QRcode', false)) {
*/
protected function getMinimumVersion($size, $level) {
for ($i=1; $i <= QRSPEC_VERSION_MAX; ++$i) {
- $words = $this->capacity[$i][QRCAP_WORDS] - $this->capacity[$i][QRCAP_EC][$level];
+ $words = $this->capacity[$i][QRCAP_WORDS] - $this->capacity[$i][QRCAP_EC][$level];
if ($words >= $size) {
return $i;
}
diff --git a/tcpdf.php b/tcpdf.php
index 3fd16c5..4884eec 100755
--- a/tcpdf.php
+++ b/tcpdf.php
@@ -1,7 +1,7 @@
* @name TCPDF
* @package com.tecnick.tcpdf
-* @version 5.9.013
+* @version 5.9.014
* @author Nicola Asuni - info@tecnick.com
* @link http://www.tcpdf.org
* @license http://www.gnu.org/copyleft/lesser.html LGPL
@@ -161,7 +161,7 @@ class TCPDF {
* @var current TCPDF version
* @access private
*/
- private $tcpdf_version = '5.9.013';
+ private $tcpdf_version = '5.9.014';
// Protected properties