coldume / imagecraft

A reliable and extensible PHP image manipulation library
MIT License
101 stars 28 forks source link

"The format "PNG" is either not supported or the file is damaged" #13

Closed reinierkors closed 8 years ago

reinierkors commented 8 years ago

When trying to upload a .png file using the following code:

$builder = new ImageBuilder();
$layer = $builder->addBackgroundLayer();
$layer->filename('uploads/'.$fullname);
$layer->resize(300, 300, 'shrink');
$image = $builder->save();

if ($image->isValid()) {
// upload.
} else {
$reponse[] = ['c' => 1, 'error' => $image->getMessage()];
}

$image->getMessage() then returns: The format "PNG" is either not supported or the file is damaged. Server supports , "PNG", "JPEG", "GIF".

I'm uploading the following image: Image

When I try other images it works fine however. I'm trying to figure out why this one isn't working.

stevecoug commented 8 years ago

I'm getting the same error with some PNG files. It works with other PNG files, though. This file does not work:

screenshot_2016-02-19-11-31-50