Vips.Image.jp2ksave (original) (raw)
Method
VipsImagejp2ksave
Declaration [src]
int
vips_jp2ksave (
VipsImage* in,
const char* filename,
...
)
Description [src]
Write a VIPS image to a file in JPEG2000 format.
The saver supports 8, 16 and 32-bit int pixel values, signed and unsigned. It supports greyscale, RGB, CMYK and multispectral images.
Use Q to set the compression quality factor. The default value produces file with approximately the same size as regular JPEG Q 75.
Set lossless to enable lossless compression.
Use tile_width and tile_height to set the tile size. The default is 512.
Chroma subsampling is normally disabled for compatibility. Setsubsample_mode to auto to enable chroma subsample for Q < 90. Subsample mode uses YCC rather than RGB colourspace, and many jpeg2000 decoders do not support this.
This operation always writes a pyramid.
Optional arguments
Q:gint, quality factorlossless:gboolean, enables lossless compressiontile_width:gint, tile widthtile_height:gint, tile widthsubsample_mode: VipsForeignSubsample, chroma subsampling mode
This method is not directly available to language bindings.
Parameters
filename
Type: const char*
File to write to.
| The data is owned by the caller of the method. |
|---|
| The value is a NUL terminated UTF-8 string. |
...
Type: ``
NULL-terminated list of optional named arguments.
Return value
Type: int
0 on success, -1 on error.