@@ -496,8 +496,10 @@ class OC_Image { | |||
return false; | |||
} | |||
$this->resource = @imagecreatefromstring($str); | |||
imagealphablending($this->resource, false); | |||
imagesavealpha($this->resource, true); | |||
if(is_resource($this->resource)) { | |||
imagealphablending($this->resource, false); | |||
imagesavealpha($this->resource, true); | |||
} | |||
if(!$this->resource) { | |||
OC_Log::write('core', 'OC_Image->loadFromData, couldn\'t load', OC_Log::DEBUG); |