Vips.Image.webpsave_buffer (original) (raw)
Method
VipsImagewebpsave_buffer
Declaration [src]
int
vips_webpsave_buffer (
VipsImage* in,
void** buf,
size_t* len,
...
)
Description [src]
As vips_webpsave(), but save to a memory buffer.
The address of the buffer is returned in buf
, the length of the buffer inlen
. You are responsible for freeing the buffer with g_free() when you are done with it.
Optional arguments
Q
:gint
, quality factorlossless
:gboolean
, enables lossless compressionpreset
: VipsForeignWebpPreset, choose lossy compression presetsmart_subsample
:gboolean
, enables high quality chroma subsamplingsmart_deblock
:gboolean
, enables auto-adjusting of the deblocking filternear_lossless
:gboolean
, preprocess in lossless mode (controlled by Q)alpha_q
:gint
, set alpha quality in lossless modeeffort
:gint
, level of CPU effort to reduce file sizetarget_size
:gint
, desired target size in bytespasses
:gint
, number of entropy-analysis passesmin_size
:gboolean
, minimise sizemixed
:gboolean
, allow both lossy and lossless encodingkmin
:gint
, minimum number of frames between keyframeskmax
:gint
, maximum number of frames between keyframes
This method is not directly available to language bindings.
Parameters
buf
Type: An array of guint8
Return output buffer here.
The argument will be set by the function. |
---|
The length of the array is specified in the len argument. |
The caller of the method takes ownership of the returned data, and is responsible for freeing it. |
len
Type: size_t*
Return output length here.
The argument will be set by the function.
...
Type: ``
NULL
-terminated list of optional named arguments.
Return value
Type: int
0 on success, -1 on error.