Merge pull request #3819 from annando/photo-rework

Better handling for GIF even, if not supported by the graphics library
This commit is contained in:
Hypolite Petovan
2017-10-23 13:04:52 -04:00
committed by GitHub
2 changed files with 37 additions and 32 deletions
+2 -2
View File
@@ -26,7 +26,7 @@ class Photo {
/**
* @brief supported mimetypes and corresponding file extensions
*/
static function supportedTypes() {
public static function supportedTypes() {
if (class_exists('Imagick')) {
// Imagick::queryFormats won't help us a lot there...
@@ -49,7 +49,7 @@ class Photo {
public function __construct($data, $type=null) {
$this->imagick = class_exists('Imagick');
$this->types = $this->supportedTypes();
$this->types = static::supportedTypes();
if (!array_key_exists($type, $this->types)){
$type='image/jpeg';
}