### Method

# Vips Image write_to_file

#### Declaration [src]

    int
    vips_image_write_to_file (
      VipsImage* image,
      const char* name,
      ...
    )

#### Description [src]

Writes `in` to `name` using the saver recommended by `vips_foreign_find_save()`.

Save options may be appended to `filename` as `[name=value,...]` or given as a `NULL`-terminated list of name-value pairs at the end of the arguments. Options given in the function call override options given in the filename.

See also

`vips_image_new_from_file()`.

This method is not directly available to language bindings.

#### Parameters

`name`

  Type: `const char*`

  Write to this file.

  The data is owned by the caller of the method.
  The value is a NUL terminated UTF-8 string.

`...`

  Type: ``

  `NULL`-terminated list of optional named arguments.

#### Return value

Type: `int`

0 on success, or -1 on error.