mirror of
https://github.com/Intervention/image.git
synced 2025-09-02 10:23:29 +02:00
Fixes
This commit is contained in:
@@ -22,7 +22,7 @@ class GifEncoder extends AbstractEncoder implements EncoderInterface
|
|||||||
|
|
||||||
protected function encodeAnimated($image): string
|
protected function encodeAnimated($image): string
|
||||||
{
|
{
|
||||||
$builder = GifBuilder::canvas($image->width(), $image->height(), 2);
|
$builder = GifBuilder::canvas($image->width(), $image->height(), $image->getLoops());
|
||||||
foreach ($image as $key => $frame) {
|
foreach ($image as $key => $frame) {
|
||||||
$source = $this->encode($frame->toImage());
|
$source = $this->encode($frame->toImage());
|
||||||
$builder->addFrame($source, $frame->getDelay());
|
$builder->addFrame($source, $frame->getDelay());
|
||||||
|
@@ -24,7 +24,7 @@ class BinaryImageDecoder extends AbstractDecoder implements DecoderInterface
|
|||||||
$imagick = $imagick->coalesceImages();
|
$imagick = $imagick->coalesceImages();
|
||||||
|
|
||||||
$image = new Image(new Collection());
|
$image = new Image(new Collection());
|
||||||
$image->setLoops($imagick->getNumberImages());
|
$image->setLoops($imagick->getImageIterations());
|
||||||
|
|
||||||
foreach ($imagick as $frame_content) {
|
foreach ($imagick as $frame_content) {
|
||||||
$image->addFrame(new Frame($frame_content));
|
$image->addFrame(new Frame($frame_content));
|
||||||
|
@@ -19,6 +19,7 @@ class GifEncoder extends AbstractEncoder implements EncoderInterface
|
|||||||
$gif->addImage($frame->getCore());
|
$gif->addImage($frame->getCore());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$gif->setImageIterations($image->getLoops());
|
||||||
$gif->setFormat($format);
|
$gif->setFormat($format);
|
||||||
$gif->setImageFormat($format);
|
$gif->setImageFormat($format);
|
||||||
$gif->setCompression($compression);
|
$gif->setCompression($compression);
|
||||||
|
Reference in New Issue
Block a user