Method
VipsImagegifsave
Declaration [src]
int
vips_gifsave (
VipsImage* in,
const char* filename,
...
)
Description [src]
Optional arguments:
dither
: %gdouble, quantisation dithering leveleffort
: %gint, quantisation CPU effortbitdepth
: %gint, number of bits per pixelinterframe_maxerror
: %gdouble, maximum inter-frame error for transparencyreuse
: %gboolean, reuse palette from inputinterlace
: %gboolean, write an interlaced (progressive) GIFinterpalette_maxerror
: %gdouble, maximum inter-palette error for palette reusagekeep_duplicate_frames
: %boolean, keep duplicate frames in the output instead of combining them
Write to a file in GIF format.
Use dither
to set the degree of Floyd-Steinberg dithering
and effort
to control the CPU effort (1 is the fastest,
10 is the slowest, 7 is the default).
Use bitdepth
(from 1 to 8, default 8) to control the number
of colours in the palette. The first entry in the palette is
always reserved for transparency. For example, a bitdepth of
4 will allow the output to contain up to 15 colours.
Use interframe_maxerror
to set the threshold below which pixels are
considered equal.
Pixels which don’t change from frame to frame can be made transparent,
improving the compression rate. Default 0.
Use interpalette_maxerror
to set the threshold below which the
previously generated palette will be reused.
If reuse
is TRUE, the GIF will be saved with a single global
palette taken from the metadata in in
, and no new palette optimisation
will be done.
If interlace
is TRUE, the GIF file will be interlaced (progressive GIF).
These files may be better for display over a slow network
connection, but need more memory to encode.
If keep_duplicate_frames
is TRUE, duplicate frames in the input will be
kept in the output instead of combining them.
See also: vips_image_new_from_file().
This method is not directly available to language bindings.