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

        $options = self::unwrap($options);
        $result = vips_image_write_to_file($this->image, $filename, $options);
        if ($result === -1) {
            self::errorVips();
        }
    }
public function writeToFile(string $filename, array $options = [])
    {
        Utils::debugLog('writeToFile', [
            'instance' => $this,
            'arguments' => [$filename, $options]
        ]);

        $options = self::unwrap($options);
        $result = vips_image_write_to_file($this->image, $filename, $options);
        if ($result === -1) {
            self::errorVips();
        }
    }
public function writeToFile ( string $ filename , array $ options = [ ] ) { Utils :: debugLog ( 'writeToFile' , [ 'instance' => $ this , 'arguments' => [ $ filename , $ options ] ] ) ; $ options = self :: unwrap ( $ options ) ; $ result = vips_image_write_to_file ( $ this -> image , $ filename , $ options ) ; if ( $ result === - 1 ) { self :: errorVips ( ) ; } }
Write an image to a file.

@param string $filename The file to write the image to.
@param array  $options  Any options to pass on to the selected save
operation.

@throws Exception

@return void
Write an image to a file .