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));
}