1
0
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:
Oliver Vogel
2024-01-03 17:10:52 +01:00
parent ec1fead71f
commit 356f79e99c

View File

@@ -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');
} }
} }