Version 4.6.0
This commit is contained in:
1 parent
f79dcf067a
commit
517a5e1f70
2036 files changed
+110041
-26162
No files matched your search
@@ -148,6 +148,13 @@ class _Gd extends \IPS\Image
|
||||
|
||||
imagepng( $this->image, NULL, $quality );
|
||||
break;
|
||||
|
||||
case 'webp':
|
||||
$quality = \IPS\Settings::i()->image_jpg_quality ?: 85;
|
||||
|
||||
imagewebp( $this->image, NULL, $quality );
|
||||
break;
|
||||
|
||||
}
|
||||
return ob_get_clean();
|
||||
}
|
||||
@@ -390,4 +397,21 @@ class _Gd extends \IPS\Image
|
||||
{
|
||||
return (bool) \function_exists( 'imagettfbbox' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Return an array of supported extensions
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function supportedExtensions()
|
||||
{
|
||||
$extensions = static::$imageExtensions;
|
||||
|
||||
if( isset( gd_info()['WebP Support'] ) and gd_info()['WebP Support'] )
|
||||
{
|
||||
$extensions[] = 'webp';
|
||||
}
|
||||
|
||||
return $extensions;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user