mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
[ticket/16712] Implement thumbnails for WEBP images in attachments
PHPBB3-16712
This commit is contained in:
parent
ed2f948bf5
commit
8f21a055ad
1 changed files with 8 additions and 0 deletions
|
@ -659,6 +659,10 @@ function create_thumbnail($source, $destination, $mimetype)
|
||||||
case IMG_WBMP:
|
case IMG_WBMP:
|
||||||
$image = @imagecreatefromwbmp($source);
|
$image = @imagecreatefromwbmp($source);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case IMG_WEBP:
|
||||||
|
$image = @imagecreatefromwebp($source);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (empty($image))
|
if (empty($image))
|
||||||
|
@ -710,6 +714,10 @@ function create_thumbnail($source, $destination, $mimetype)
|
||||||
case IMG_WBMP:
|
case IMG_WBMP:
|
||||||
imagewbmp($new_image, $destination);
|
imagewbmp($new_image, $destination);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case IMG_WEBP:
|
||||||
|
imagewebp($new_image, $destination);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
imagedestroy($new_image);
|
imagedestroy($new_image);
|
||||||
|
|
Loading…
Add table
Reference in a new issue