image resizing: fix a problem with some pngs; reported by urban
This commit is contained in:
parent
4202e8123d
commit
9a5f3b2e31
@ -338,8 +338,10 @@ class ImageConvert extends ImageBase {
|
|||||||
$this->width,
|
$this->width,
|
||||||
$this->height,
|
$this->height,
|
||||||
escapeshellarg($this->temp)))) || !file_exists($this->temp)) {
|
escapeshellarg($this->temp)))) || !file_exists($this->temp)) {
|
||||||
$this->destroy();
|
if (!preg_match ('/sBIT: invalid/', $error)) {
|
||||||
error('Failed to resize image!', null, $error);
|
$this->destroy();
|
||||||
|
error('Failed to resize image!', null, $error);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if ($size = $this->get_size($this->temp)) {
|
if ($size = $this->get_size($this->temp)) {
|
||||||
$this->width = $size[0];
|
$this->width = $size[0];
|
||||||
@ -361,8 +363,10 @@ class ImageConvert extends ImageBase {
|
|||||||
$this->width,
|
$this->width,
|
||||||
$this->height,
|
$this->height,
|
||||||
escapeshellarg($this->temp)))) || !file_exists($this->temp)) {
|
escapeshellarg($this->temp)))) || !file_exists($this->temp)) {
|
||||||
$this->destroy();
|
if (!preg_match ('/sBIT: invalid/', $error)) {
|
||||||
error('Failed to resize image!', null, $error);
|
$this->destroy();
|
||||||
|
error('Failed to resize image!', null, $error);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if ($size = $this->get_size($this->temp)) {
|
if ($size = $this->get_size($this->temp)) {
|
||||||
$this->width = $size[0];
|
$this->width = $size[0];
|
||||||
|
Loading…
Reference in New Issue
Block a user