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();
        }
    }