Forum


Replies: 4   Views: 3275
Images in headers
Topic closed:
Please note this is an old forum thread. Information in this post may be out-to-date and/or erroneous.
Every phpdocx version includes new features and improvements. Previously unsupported features may have been added to newer releases, or past issues may have been corrected.
We encourage you to download the current phpdocx version and check the Documentation available.

Posted by fortech  · 11-04-2013 - 12:13

I think I found the root cause.

classes/CreateImage::
private function getDpiPng($filename)
{
$a = fopen($filename, 'r');
$string = fread($a, 1000);
$aux = strpos($string, 'pHYs'); // <-- $aux = 0, pHYs is not in the file
$data = bin2hex(substr($string, $aux + strlen('pHYs'), 16));
fclose($a);
$x = substr($data, 0, 8);
$y = substr($data, 8, 8);
return array(hexdec($x), hexdec($y));
}