mirror of
https://github.com/Intervention/image.git
synced 2025-08-30 09:10:21 +02:00
Refactor code
This commit is contained in:
@@ -13,9 +13,8 @@ class WebpEncoder extends DriverSpecializedEncoder
|
||||
{
|
||||
public function encode(ImageInterface $image): EncodedImage
|
||||
{
|
||||
$gd = $image->core()->native();
|
||||
$data = $this->getBuffered(function () use ($gd) {
|
||||
imagewebp($gd, null, $this->quality);
|
||||
$data = $this->getBuffered(function () use ($image) {
|
||||
imagewebp($image->core()->native(), null, $this->quality);
|
||||
});
|
||||
|
||||
return new EncodedImage($data, 'image/webp');
|
||||
|
Reference in New Issue
Block a user