1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2024-11-29 09:44:28 +01:00

image resizing: fix a problem with some pngs; reported by urban

This commit is contained in:
czaks 2014-01-04 19:09:30 +01:00
parent f4d3112617
commit 4aa6e607f8

View File

@ -338,8 +338,10 @@ class ImageConvert extends ImageBase {
$this->width,
$this->height,
escapeshellarg($this->temp)))) || !file_exists($this->temp)) {
$this->destroy();
error('Failed to resize image!', null, $error);
if (!preg_match ('/sBIT: invalid/', $error)) {
$this->destroy();
error('Failed to resize image!', null, $error);
}
}
if ($size = $this->get_size($this->temp)) {
$this->width = $size[0];
@ -361,8 +363,10 @@ class ImageConvert extends ImageBase {
$this->width,
$this->height,
escapeshellarg($this->temp)))) || !file_exists($this->temp)) {
$this->destroy();
error('Failed to resize image!', null, $error);
if (!preg_match ('/sBIT: invalid/', $error)) {
$this->destroy();
error('Failed to resize image!', null, $error);
}
}
if ($size = $this->get_size($this->temp)) {
$this->width = $size[0];