Version 4.6.0
This commit is contained in:
1 parent
f79dcf067a
commit
517a5e1f70
2036 files changed
+110041
-26162
No files matched your search
@@ -56,7 +56,7 @@ class _Imagemagick extends \IPS\Image
|
||||
$this->imagick = new \Imagick( $this->tempFile );
|
||||
|
||||
/* Set quality (if image format is JPEG) */
|
||||
if ( \in_array( mb_strtolower( $this->imagick->getImageFormat() ), array( 'jpg', 'jpeg' ) ) )
|
||||
if ( \in_array( mb_strtolower( $this->imagick->getImageFormat() ), array( 'jpg', 'jpeg', 'webp' ) ) )
|
||||
{
|
||||
$this->imagick->setImageCompressionQuality( (int) \IPS\Settings::i()->image_jpg_quality ?: 85 );
|
||||
}
|
||||
@@ -343,4 +343,21 @@ class _Imagemagick extends \IPS\Image
|
||||
|
||||
$this->imagick->annotateImage( $draw, 0, 0, 0, $text );
|
||||
}
|
||||
|
||||
/**
|
||||
* Return an array of supported extensions
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function supportedExtensions()
|
||||
{
|
||||
$extensions = static::$imageExtensions;
|
||||
|
||||
if( \in_array( 'WEBP', \Imagick::queryFormats() ) )
|
||||
{
|
||||
$extensions[] = 'webp';
|
||||
}
|
||||
|
||||
return $extensions;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user