Skip to content

Commit

Permalink
Adapt gif encoder api to intervention/gif v4
Browse files Browse the repository at this point in the history
  • Loading branch information
olivervogel committed Jan 3, 2024
1 parent ec1fead commit 356f79e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Drivers/Gd/Encoders/GifEncoder.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ protected function encodeAnimated(ImageInterface $image): EncodedImage
{
$builder = GifBuilder::canvas(
$image->width(),
$image->height(),
$image->loops()
$image->height()
);

foreach ($image as $frame) {
Expand All @@ -38,6 +37,8 @@ protected function encodeAnimated(ImageInterface $image): EncodedImage
);
}

$builder->setLoops($image->loops());

return new EncodedImage($builder->encode(), 'image/gif');
}
}

0 comments on commit 356f79e

Please sign in to comment.