### Method

# Vips Image copy_file

#### Declaration [src]

    int
    vips_copy_file (
      VipsImage* in,
      VipsImage** out,
      ...
    )

#### Description [src]

A simple convenience function to copy an image to a file, then copy again to output. If the image is already a file, just copy straight through.

The file is allocated with `vips_image_new_temp_file()`. The file is automatically deleted when `out` is closed.

See also

`vips_copy()`, `vips_image_new_temp_file()`.

This method is not directly available to language bindings.

#### Parameters

`out`

  Type: `VipsImage`

  Output image.

  The argument will be set by the function.
  The caller of the method takes ownership of the returned data, and is responsible for freeing it.

`...`

  Type: ``

  `NULL`-terminated list of optional named arguments.

#### Return value

Type: `int`

0 on success, -1 on error.