mirror of
https://github.com/Intervention/image.git
synced 2025-08-29 16:50:07 +02:00
Adapt gif encoder api to intervention/gif v4
This commit is contained in:
@@ -27,8 +27,7 @@ class GifEncoder extends DriverSpecializedEncoder
|
|||||||
{
|
{
|
||||||
$builder = GifBuilder::canvas(
|
$builder = GifBuilder::canvas(
|
||||||
$image->width(),
|
$image->width(),
|
||||||
$image->height(),
|
$image->height()
|
||||||
$image->loops()
|
|
||||||
);
|
);
|
||||||
|
|
||||||
foreach ($image as $frame) {
|
foreach ($image as $frame) {
|
||||||
@@ -38,6 +37,8 @@ class GifEncoder extends DriverSpecializedEncoder
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$builder->setLoops($image->loops());
|
||||||
|
|
||||||
return new EncodedImage($builder->encode(), 'image/gif');
|
return new EncodedImage($builder->encode(), 'image/gif');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user