mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-19 21:15:14 +00:00
more support for image/webp in gd
This commit is contained in:
parent
8f9e30305e
commit
877f494e7e
1 changed files with 8 additions and 0 deletions
|
@ -22,6 +22,9 @@ class PhotoGd extends PhotoDriver {
|
|||
if (imagetypes() & IMG_GIF) {
|
||||
$t['image/gif'] = 'gif';
|
||||
}
|
||||
if (imagetypes() & IMG_WEBP) {
|
||||
$t['image/webp'] = 'webp';
|
||||
}
|
||||
|
||||
return $t;
|
||||
}
|
||||
|
@ -160,6 +163,11 @@ class PhotoGd extends PhotoDriver {
|
|||
ob_start();
|
||||
|
||||
switch ($this->getType()){
|
||||
case 'image/webp':
|
||||
|
||||
\imagewebp($this->image);
|
||||
break;
|
||||
|
||||
case 'image/png':
|
||||
$quality = get_config('system', 'png_quality');
|
||||
if ((! $quality) || ($quality > 9)) {
|
||||
|
|
Loading…
Reference in a new issue