Function

Vipsjp2kload

Declaration [src]

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

Description [src]

Optional arguments:

  • page: %gint, load this page
  • fail_on: VipsFailOn, types of read error to fail on

Read a JPEG2000 image. The loader supports 8, 16 and 32-bit int pixel values, signed and unsigned. It supports greyscale, RGB, YCC, CMYK and multispectral colour spaces. It will read any ICC profile on the image.

It will only load images where all channels have the same format.

Use page to set the page to load, where page 0 is the base resolution image and higher-numbered pages are x2 reductions. Use the metadata item “n-pages” to find the number of pyramid layers.

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.

See also: vips_image_new_from_file().

This function is not directly available to language bindings

Parameters

filename 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 VipsImage
 

Decompressed image.

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

NULL-terminated list of optional named arguments.

Return value

Returns: int
 

0 on success, -1 on error.