@@ 5046-5055 (lines=10) @@ | ||
5043 | ||
5044 | //print_r($info); |
|
5045 | $haveHeader = 1; |
|
5046 | if ($info['compressionMethod'] != 0) { |
|
5047 | $error = 1; |
|
5048 | ||
5049 | //debugpng |
|
5050 | if (defined("DEBUGPNG") && DEBUGPNG) { |
|
5051 | print '[addPngFromFile unsupported compression method ' . $file . ']'; |
|
5052 | } |
|
5053 | ||
5054 | $errormsg = 'unsupported compression method'; |
|
5055 | } |
|
5056 | ||
5057 | if ($info['filterMethod'] != 0) { |
|
5058 | $error = 1; |
|
@@ 5057-5066 (lines=10) @@ | ||
5054 | $errormsg = 'unsupported compression method'; |
|
5055 | } |
|
5056 | ||
5057 | if ($info['filterMethod'] != 0) { |
|
5058 | $error = 1; |
|
5059 | ||
5060 | //debugpng |
|
5061 | if (defined("DEBUGPNG") && DEBUGPNG) { |
|
5062 | print '[addPngFromFile unsupported filter method ' . $file . ']'; |
|
5063 | } |
|
5064 | ||
5065 | $errormsg = 'unsupported filter method'; |
|
5066 | } |
|
5067 | break; |
|
5068 | ||
5069 | case 'PLTE': |
|
@@ 5160-5169 (lines=10) @@ | ||
5157 | $errormsg = 'information header is missing'; |
|
5158 | } |
|
5159 | ||
5160 | if (isset($info['interlaceMethod']) && $info['interlaceMethod']) { |
|
5161 | $error = 1; |
|
5162 | ||
5163 | //debugpng |
|
5164 | if (defined("DEBUGPNG") && DEBUGPNG) { |
|
5165 | print '[addPngFromFile no support for interlaced images in pdf ' . $file . ']'; |
|
5166 | } |
|
5167 | ||
5168 | $errormsg = 'There appears to be no support for interlaced images in pdf.'; |
|
5169 | } |
|
5170 | } |
|
5171 | ||
5172 | if (!$error && $info['bitDepth'] > 8) { |
|
@@ 5172-5181 (lines=10) @@ | ||
5169 | } |
|
5170 | } |
|
5171 | ||
5172 | if (!$error && $info['bitDepth'] > 8) { |
|
5173 | $error = 1; |
|
5174 | ||
5175 | //debugpng |
|
5176 | if (defined("DEBUGPNG") && DEBUGPNG) { |
|
5177 | print '[addPngFromFile bit depth of 8 or less is supported ' . $file . ']'; |
|
5178 | } |
|
5179 | ||
5180 | $errormsg = 'only bit depth of 8 or less is supported'; |
|
5181 | } |
|
5182 | ||
5183 | if (!$error) { |
|
5184 | switch ($info['colorType']) { |