stil / gif-endec

PHP GIF encoder and decoder
63 stars 16 forks source link

Disposal method 3 is not implemented #17

Open james090500 opened 3 years ago

james090500 commented 3 years ago

Some GIF's give this error when trying to decode. I have attached a broken GIF and a working GIF

WORKING - WORKING BROKEN - BROKEN

Source of error: https://github.com/stil/gif-endec/blob/master/src/Renderer.php#L66-L73 Code Example

            $gifStream = new FileStream($uploadedFile);
            $gifDecoder = new Decoder($gifStream);
            $gifRenderer = new Renderer($gifDecoder);

            $gifRenderer->start(function(FrameRenderedEvent $event) use (&$frames) {
                $frames[] = $event->renderedFrame;
            });

The error from laravel

    "message": "Disposal method 3 is not implemented.",
    "exception": "RuntimeException",
    "file": "C:\\wamp64\\www\\minecraftcapes\\vendor\\stil\\gif-endec\\src\\Renderer.php",
    "line": 72,