Merge pull request #671 from vichan-devel/webpsupport

add webp support to vichan

exact changes are on soyjak.party and work
This commit is contained in:
Lorenzo Yario authored and GitHub committed 2024-02-14 03:19:19 -08:00
commit 421e7ff283
3 files changed
+11 -1

No files matched your search

+1
View File
@@ -818,6 +818,7 @@
$config['allowed_ext'][] = 'bmp';
$config['allowed_ext'][] = 'gif';
$config['allowed_ext'][] = 'png';
$config['allowed_ext'][] = 'webp';
// $config['allowed_ext'][] = 'svg';
// Allowed extensions for OP. Inherits from the above setting if set to false. Otherwise, it overrides both allowed_ext and
+9
View File
@@ -496,3 +496,12 @@ class ImageBMP extends ImageBase {
imagebmp($this->image, $src);
}
}
class ImageWEBP extends ImageBase {
public function from() {
$this->image = @imagecreatefromwebp($this->src);
}
public function to($src) {
imagewebp($this->image, $src);
}
}