From f6fc87b3a65fbdc5bd43056e029ac19a13ced01b Mon Sep 17 00:00:00 2001 From: 8chan Admin Date: Thu, 26 Dec 2013 19:58:39 +0000 Subject: [PATCH] libpng 1.6 workaround --- inc/image.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/inc/image.php b/inc/image.php index 1d591c25..0569aca2 100644 --- a/inc/image.php +++ b/inc/image.php @@ -361,8 +361,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 (strpos($error, "known incorrect sRGB profile") === "false") { + $this->destroy(); + error('Failed to resize image!', null, $error); + } } if ($size = $this->get_size($this->temp)) { $this->width = $size[0];