Vips.Image.csvload
Description: Reference for Vips.Image.csvload

### Constructor

# Vips Imagecsvload

#### Declaration [src]

    int
    vips_csvload (
      const char* filename,
      VipsImage** out,
      ...
    )

#### Description [src]

Load a CSV (comma-separated values) file.

The output image is always 1 band (monochrome), `VIPS_FORMAT_DOUBLE`. Use `vips_bandfold()` to turn RGBRGBRGB mono images into colour images.

Items in lines can be either floating point numbers in the C locale, or strings enclosed in double-quotes (“), or empty. You can use a backslash () within the quotes to escape special characters, such as quote marks.

`skip` sets the number of lines to skip at the start of the file. Default zero.

`lines` sets the number of lines to read from the file. Default -1, meaning read all lines to end of file.

`whitespace` sets the skippable whitespace characters. Default space. Whitespace characters are always run together.

`separator` sets the characters that separate fields. Default ;,tab. Separators are never run together.

Use `fail_on` to set the type of error that will cause load to fail. By default, loaders are permissive, that is, `VIPS_FAIL_ON_NONE`.

Optional arguments

- `skip`: `gint`, skip this many lines at start of file
- `lines`: `gint`, read this many lines from file
- `whitespace`: `gchararray`, set of whitespace characters
- `separator`: `gchararray`, set of separator characters
- `fail_on`: `VipsFailOn`, types of read error to fail on

See also

`vips_image_new_from_file()`, `vips_bandfold()`.

This constructor is not directly available to language bindings.

#### Parameters

`filename`

  Type: `const char*`

  File to load.

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

`out`

  Type: `VipsImage`

  Output image.

  The argument will be set by the function.
  The caller of the function 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.