La linia del error esen la cabecera de content-type - Header('Content-type: image/png');
Código PHP:
case 'png':
if (! $this->is_inline) {
Header('Content-type: image/png');
}
if ($this->is_inline && $this->output_file != '') {
ImagePng($this->img, $this->output_file);
} else {
ImagePng($this->img);
}
break;