### Method

# Vips Image jp2ksave_buffer

#### Declaration [src]

    int
    vips_jp2ksave_buffer (
      VipsImage* in,
      void** buf,
      size_t* len,
      ...
    )

#### Description [src]

As `vips_jp2ksave()`, but save to a target.

Optional arguments

- `Q`: `gint`, quality factor
- `lossless`: `gboolean`, enables lossless compression
- `tile_width`: `gint`, tile width
- `tile_height`: `gint`, tile width
- `subsample_mode`: `VipsForeignSubsample`, chroma subsampling mode

See also

`vips_jp2ksave()`, `vips_image_write_to_target()`.

This method is not directly available to language bindings.

#### Parameters

`buf`

  Type: An array of `guint8`

  Return output buffer here.

  The length of the array is specified in the `len` argument.
  The data is owned by the caller of the method.

`len`

  Type: `size_t*`

  Return output length here.

  The data is owned by the caller of the method.

`...`

  Type: ``

  `NULL`-terminated list of optional named arguments.

#### Return value

Type: `int`

0 on success, -1 on error.