public function encoding($mode)
    {
        $encodings = [
            self::ENCODING_JPG,
            self::ENCODING_BMP,
            self::ENCODING_GIF,
            self::ENCODING_PNG,
        ];

        $this->assertInArray($mode, $encodings);

        $this->valueArguments['encoding'] = $mode;

        return $this;
    }
public function encoding($mode)
    {
        $encodings = [
            self::ENCODING_JPG,
            self::ENCODING_BMP,
            self::ENCODING_GIF,
            self::ENCODING_PNG,
        ];

        $this->assertInArray($mode, $encodings);

        $this->valueArguments['encoding'] = $mode;

        return $this;
    }
public function encoding ( $ mode ) { $ encodings = [ self :: ENCODING_JPG , self :: ENCODING_BMP , self :: ENCODING_GIF , self :: ENCODING_PNG , ] ; $ this -> assertInArray ( $ mode , $ encodings ) ; $ this -> valueArguments [ 'encoding' ] = $ mode ; return $ this ; }
Encoding to use for output file

Note that unaccelerated image types (gif, png, bmp) will take much longer to save than JPG which is hardware
accelerated. Also note that the filename suffix is completely ignored when deciding the encoding of a file.

Possible options are:
- 'jpg' `Raspicam::ENCODING_JPG` (default)
- 'bmp' `Raspicam::ENCODING_BMP`
- 'gif' `Raspicam::ENCODING_GIF`
- 'png' `Raspicam::ENCODING_PNG`

@param string $mode Encoding mode

@return $this
Encoding to use for output file