Constructor

VipsImagenew_temp_file

Declaration [src]

VipsImage*
vips_image_new_temp_file (
  const char* format
)

Description [src]

Make a VipsImage which, when written to, will create a temporary file on disc. The file will be automatically deleted when the image is destroyed. format is something like “%s.v” for a vips file.

The file is created in the temporary directory. This is set with the environment variable TMPDIR. If this is not set, then on Unix systems, vips will default to /tmp. On Windows, vips uses GetTempPath() to find the temporary directory.

See also

vips_image_new().

Parameters

format

Type: const char*

Format of file.

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

Return value

Type: VipsImage

The new VipsImage, or NULL on error.

The caller of the function takes ownership of the data, and is responsible for freeing it.