public function writeToBuffer(string $suffix, array $options = []): string
    {
        Utils::debugLog('writeToBuffer', [
            'instance' => $this,
            'arguments' => [$suffix, $options]
        ]);

        $options = self::unwrap($options);
        $result = vips_image_write_to_buffer($this->image, $suffix, $options);
        if ($result === -1) {
            self::errorVips();
        }
        $result = self::wrapResult($result);

        Utils::debugLog('writeToBuffer', ['result' => $result]);

        return $result;
    }
public function writeToBuffer(string $suffix, array $options = []): string
    {
        Utils::debugLog('writeToBuffer', [
            'instance' => $this,
            'arguments' => [$suffix, $options]
        ]);

        $options = self::unwrap($options);
        $result = vips_image_write_to_buffer($this->image, $suffix, $options);
        if ($result === -1) {
            self::errorVips();
        }
        $result = self::wrapResult($result);

        Utils::debugLog('writeToBuffer', ['result' => $result]);

        return $result;
    }
public function writeToBuffer ( string $ suffix , array $ options = [ ] ) : string { Utils :: debugLog ( 'writeToBuffer' , [ 'instance' => $ this , 'arguments' => [ $ suffix , $ options ] ] ) ; $ options = self :: unwrap ( $ options ) ; $ result = vips_image_write_to_buffer ( $ this -> image , $ suffix , $ options ) ; if ( $ result === - 1 ) { self :: errorVips ( ) ; } $ result = self :: wrapResult ( $ result ) ; Utils :: debugLog ( 'writeToBuffer' , [ 'result' => $ result ] ) ; return $ result ; }
Write an image to a formatted string.

@param string $suffix  The file type suffix, eg. ".jpg".
@param array  $options Any options to pass on to the selected save
operation.

@throws Exception

@return string The formatted image.
Write an image to a formatted string .