React\Gifsocket\GifStream::addFrame PHP Method

addFrame() public method

public addFrame ( $frame, $delay )
    public function addFrame($frame, $delay = 0)
    {
        $data = $this->encoder->addFrame($frame, $delay);
        $this->emit('data', [$data]);
    }

Usage Example

Example #1
0
 public function resendFrame(GifStream $gif, $frame)
 {
     if ($gif->lastFrame !== $frame) {
         return;
     }
     $gif->addFrame($frame);
 }