doc fixups
various small things; fix the docs for composite, reduceh and reducev
This commit is contained in:
parent
0702a01e60
commit
c5139a0e50
@ -50,7 +50,7 @@ FIXXREF_OPTIONS=
|
||||
# e.g. HFILE_GLOB=$(top_srcdir)/gtk/*.h
|
||||
# e.g. CFILE_GLOB=$(top_srcdir)/gtk/*.c
|
||||
HFILE_GLOB=$(top_srcdir)/libvips/include/vips/*.h
|
||||
CFILE_GLOB=$(top_srcdir)/libvips/*/*.c $(top_srcdir)/libvips/*/*.cpp
|
||||
CFILE_GLOB=$(top_srcdir)/libvips/*/*.c
|
||||
|
||||
# Extra header to include when scanning, which are not under DOC_SOURCE_DIR
|
||||
# e.g. EXTRA_HFILES=$(top_srcdir}/contrib/extra.h
|
||||
|
@ -65,42 +65,6 @@
|
||||
#undef HAVE_VECTOR_ARITH
|
||||
*/
|
||||
|
||||
/**
|
||||
* VipsBlendMode:
|
||||
* VIPS_BLEND_MODE_CLEAR:
|
||||
* VIPS_BLEND_MODE_SOURCE:
|
||||
* VIPS_BLEND_MODE_OVER:
|
||||
* VIPS_BLEND_MODE_IN:
|
||||
* VIPS_BLEND_MODE_OUT:
|
||||
* VIPS_BLEND_MODE_ATOP:
|
||||
* VIPS_BLEND_MODE_DEST:
|
||||
* VIPS_BLEND_MODE_DEST_OVER:
|
||||
* VIPS_BLEND_MODE_DEST_IN:
|
||||
* VIPS_BLEND_MODE_DEST_OUT:
|
||||
* VIPS_BLEND_MODE_DEST_ATOP:
|
||||
* VIPS_BLEND_MODE_XOR:
|
||||
* VIPS_BLEND_MODE_ADD:
|
||||
* VIPS_BLEND_MODE_SATURATE:
|
||||
* VIPS_BLEND_MODE_MULTIPLY:
|
||||
* VIPS_BLEND_MODE_SCREEN:
|
||||
* VIPS_BLEND_MODE_OVERLAY:
|
||||
* VIPS_BLEND_MODE_DARKEN:
|
||||
* VIPS_BLEND_MODE_LIGHTEN:
|
||||
* VIPS_BLEND_MODE_COLOUR_DODGE:
|
||||
* VIPS_BLEND_MODE_COLOUR_BURN:
|
||||
* VIPS_BLEND_MODE_HARD_LIGHT:
|
||||
* VIPS_BLEND_MODE_SOFT_LIGHT:
|
||||
* VIPS_BLEND_MODE_DIFFERENCE:
|
||||
* VIPS_BLEND_MODE_EXCLUSION:
|
||||
*
|
||||
* The various Porter-Duff and PDF blend modes. See vips_composite_base(),
|
||||
* for example.
|
||||
*
|
||||
* The Cairo docs have a nice explanation of all the blend modes:
|
||||
*
|
||||
* https://www.cairographics.org/operators
|
||||
*/
|
||||
|
||||
/* We have a vector path with gcc's vector attr.
|
||||
*/
|
||||
#ifdef HAVE_VECTOR_ARITH
|
||||
@ -1232,53 +1196,9 @@ vips_compositev( VipsImage **in, VipsImage **out, int n, int *mode, va_list ap )
|
||||
return( result );
|
||||
}
|
||||
|
||||
/**
|
||||
* vips_composite: (method)
|
||||
* @in: (array length=n) (transfer none): array of input images
|
||||
* @out: (out): output image
|
||||
* @n: number of input images
|
||||
* @mode: array of (@n - 1) #VipsBlendMode
|
||||
* @...: %NULL-terminated list of optional named arguments
|
||||
*
|
||||
* Optional arguments:
|
||||
*
|
||||
* * @compositing_space: #VipsInterpretation to composite in
|
||||
* * @premultiplied: %gboolean, images are already premultiplied
|
||||
*
|
||||
* Composite an array of images together.
|
||||
*
|
||||
* Images are placed in a stack, with @in[0] at the bottom and @in[@n - 1] at
|
||||
* the top. Pixels are blended together working from the bottom upwards, with
|
||||
* the blend mode at each step being set by the corresponding #VipsBlendMode
|
||||
* in @mode.
|
||||
*
|
||||
* Images are transformed to a compositing space before processing. This is
|
||||
* #VIPS_INTERPRETATION_sRGB, #VIPS_INTERPRETATION_B_W,
|
||||
* #VIPS_INTERPRETATION_RGB16, or #VIPS_INTERPRETATION_GREY16
|
||||
* by default, depending on
|
||||
* how many bands and bits the input images have. You can select any other
|
||||
* space, such as #VIPS_INTERPRETATION_LAB or #VIPS_INTERPRETATION_scRGB.
|
||||
*
|
||||
* The output image is in the compositing space. It will always be
|
||||
* #VIPS_FORMAT_FLOAT unless one of the inputs is #VIPS_FORMAT_DOUBLE, in
|
||||
* which case the output will be double as well.
|
||||
*
|
||||
* Complex images are not supported.
|
||||
*
|
||||
* The output image will always have an alpha band. A solid alpha is
|
||||
* added to any input missing an alpha.
|
||||
*
|
||||
* The images do not need to match in size or format. They will be expanded to
|
||||
* the smallest common size and format in the usual way.
|
||||
*
|
||||
* Image are normally treated as unpremultiplied, so this operation can be used
|
||||
* directly on PNG images. If your images have been through vips_premultiply(),
|
||||
* set @premultiplied.
|
||||
*
|
||||
* See also: vips_insert().
|
||||
*
|
||||
* Returns: 0 on success, -1 on error
|
||||
/* See conversion.c for the doc comment.
|
||||
*/
|
||||
|
||||
int
|
||||
vips_composite( VipsImage **in, VipsImage **out, int n, int *mode, ... )
|
||||
{
|
||||
@ -1380,18 +1300,9 @@ vips_composite2_init( VipsComposite2 *composite2 )
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* vips_composite2: (method)
|
||||
* @base: first input image
|
||||
* @overlay: second input image
|
||||
* @out: (out): output image
|
||||
* @mode: composite with this blend mode
|
||||
* @...: %NULL-terminated list of optional named arguments
|
||||
*
|
||||
* Composite @overlay on top of @base with @mode. See vips_composite().
|
||||
*
|
||||
* Returns: 0 on success, -1 on error
|
||||
/* See conversion.c for the doc comment.
|
||||
*/
|
||||
|
||||
int
|
||||
vips_composite2( VipsImage *base, VipsImage *overlay, VipsImage **out,
|
||||
VipsBlendMode mode, ... )
|
||||
|
@ -69,6 +69,103 @@
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* vips_composite: (method)
|
||||
* @in: (array length=n) (transfer none): array of input images
|
||||
* @out: (out): output image
|
||||
* @n: number of input images
|
||||
* @mode: array of (@n - 1) #VipsBlendMode
|
||||
* @...: %NULL-terminated list of optional named arguments
|
||||
*
|
||||
* Optional arguments:
|
||||
*
|
||||
* * @compositing_space: #VipsInterpretation to composite in
|
||||
* * @premultiplied: %gboolean, images are already premultiplied
|
||||
*
|
||||
* Composite an array of images together.
|
||||
*
|
||||
* Images are placed in a stack, with @in[0] at the bottom and @in[@n - 1] at
|
||||
* the top. Pixels are blended together working from the bottom upwards, with
|
||||
* the blend mode at each step being set by the corresponding #VipsBlendMode
|
||||
* in @mode.
|
||||
*
|
||||
* Images are transformed to a compositing space before processing. This is
|
||||
* #VIPS_INTERPRETATION_sRGB, #VIPS_INTERPRETATION_B_W,
|
||||
* #VIPS_INTERPRETATION_RGB16, or #VIPS_INTERPRETATION_GREY16
|
||||
* by default, depending on
|
||||
* how many bands and bits the input images have. You can select any other
|
||||
* space, such as #VIPS_INTERPRETATION_LAB or #VIPS_INTERPRETATION_scRGB.
|
||||
*
|
||||
* The output image is in the compositing space. It will always be
|
||||
* #VIPS_FORMAT_FLOAT unless one of the inputs is #VIPS_FORMAT_DOUBLE, in
|
||||
* which case the output will be double as well.
|
||||
*
|
||||
* Complex images are not supported.
|
||||
*
|
||||
* The output image will always have an alpha band. A solid alpha is
|
||||
* added to any input missing an alpha.
|
||||
*
|
||||
* The images do not need to match in size or format. They will be expanded to
|
||||
* the smallest common size and format in the usual way.
|
||||
*
|
||||
* Image are normally treated as unpremultiplied, so this operation can be used
|
||||
* directly on PNG images. If your images have been through vips_premultiply(),
|
||||
* set @premultiplied.
|
||||
*
|
||||
* See also: vips_insert().
|
||||
*
|
||||
* Returns: 0 on success, -1 on error
|
||||
*/
|
||||
|
||||
/**
|
||||
* vips_composite2: (method)
|
||||
* @base: first input image
|
||||
* @overlay: second input image
|
||||
* @out: (out): output image
|
||||
* @mode: composite with this blend mode
|
||||
* @...: %NULL-terminated list of optional named arguments
|
||||
*
|
||||
* Composite @overlay on top of @base with @mode. See vips_composite().
|
||||
*
|
||||
* Returns: 0 on success, -1 on error
|
||||
*/
|
||||
|
||||
/**
|
||||
* VipsBlendMode:
|
||||
* VIPS_BLEND_MODE_CLEAR:
|
||||
* VIPS_BLEND_MODE_SOURCE:
|
||||
* VIPS_BLEND_MODE_OVER:
|
||||
* VIPS_BLEND_MODE_IN:
|
||||
* VIPS_BLEND_MODE_OUT:
|
||||
* VIPS_BLEND_MODE_ATOP:
|
||||
* VIPS_BLEND_MODE_DEST:
|
||||
* VIPS_BLEND_MODE_DEST_OVER:
|
||||
* VIPS_BLEND_MODE_DEST_IN:
|
||||
* VIPS_BLEND_MODE_DEST_OUT:
|
||||
* VIPS_BLEND_MODE_DEST_ATOP:
|
||||
* VIPS_BLEND_MODE_XOR:
|
||||
* VIPS_BLEND_MODE_ADD:
|
||||
* VIPS_BLEND_MODE_SATURATE:
|
||||
* VIPS_BLEND_MODE_MULTIPLY:
|
||||
* VIPS_BLEND_MODE_SCREEN:
|
||||
* VIPS_BLEND_MODE_OVERLAY:
|
||||
* VIPS_BLEND_MODE_DARKEN:
|
||||
* VIPS_BLEND_MODE_LIGHTEN:
|
||||
* VIPS_BLEND_MODE_COLOUR_DODGE:
|
||||
* VIPS_BLEND_MODE_COLOUR_BURN:
|
||||
* VIPS_BLEND_MODE_HARD_LIGHT:
|
||||
* VIPS_BLEND_MODE_SOFT_LIGHT:
|
||||
* VIPS_BLEND_MODE_DIFFERENCE:
|
||||
* VIPS_BLEND_MODE_EXCLUSION:
|
||||
*
|
||||
* The various Porter-Duff and PDF blend modes. See vips_composite_base(),
|
||||
* for example.
|
||||
*
|
||||
* The Cairo docs have a nice explanation of all the blend modes:
|
||||
*
|
||||
* https://www.cairographics.org/operators
|
||||
*/
|
||||
|
||||
/**
|
||||
* VipsAlign:
|
||||
* @VIPS_ALIGN_LOW: align low coordinate edge
|
||||
@ -113,15 +210,15 @@
|
||||
|
||||
/**
|
||||
* VipsCompassDirection:
|
||||
* @VIPS_COMPASS_DIRECTION_CENTRE:
|
||||
* @VIPS_COMPASS_DIRECTION_NORTH:
|
||||
* @VIPS_COMPASS_DIRECTION_EAST:
|
||||
* @VIPS_COMPASS_DIRECTION_SOUTH:
|
||||
* @VIPS_COMPASS_DIRECTION_WEST:
|
||||
* @VIPS_COMPASS_DIRECTION_NORTH_EAST:
|
||||
* @VIPS_COMPASS_DIRECTION_SOUTH_EAST:
|
||||
* @VIPS_COMPASS_DIRECTION_SOUTH_WEST:
|
||||
* @VIPS_COMPASS_DIRECTION_NORTH_WEST:
|
||||
* @VIPS_COMPASS_DIRECTION_CENTRE: centre
|
||||
* @VIPS_COMPASS_DIRECTION_NORTH: north
|
||||
* @VIPS_COMPASS_DIRECTION_EAST: east
|
||||
* @VIPS_COMPASS_DIRECTION_SOUTH: south
|
||||
* @VIPS_COMPASS_DIRECTION_WEST: west
|
||||
* @VIPS_COMPASS_DIRECTION_NORTH_EAST: north-east
|
||||
* @VIPS_COMPASS_DIRECTION_SOUTH_EAST: south-east
|
||||
* @VIPS_COMPASS_DIRECTION_SOUTH_WEST: south-west
|
||||
* @VIPS_COMPASS_DIRECTION_NORTH_WEST: north-west
|
||||
*
|
||||
* A direction on a compass. Used for vips_gravity(), for example.
|
||||
*/
|
||||
|
@ -61,8 +61,8 @@ typedef struct _VipsDbuf {
|
||||
|
||||
} VipsDbuf;
|
||||
|
||||
void vips_dbuf_destroy( VipsDbuf *buf );
|
||||
void vips_dbuf_init( VipsDbuf *buf );
|
||||
void vips_dbuf_destroy( VipsDbuf *dbuf );
|
||||
void vips_dbuf_init( VipsDbuf *dbuf );
|
||||
gboolean vips_dbuf_allocate( VipsDbuf *dbuf, size_t size );
|
||||
size_t vips_dbuf_read( VipsDbuf *dbuf, unsigned char *data, size_t size );
|
||||
unsigned char *vips_dbuf_get_write( VipsDbuf *dbuf, size_t *size );
|
||||
|
@ -63,13 +63,13 @@
|
||||
* VipsBuf buf = VIPS_BUF_STATIC (txt);
|
||||
* int i;
|
||||
*
|
||||
* vips_buf_appends (&buf, "Numbers are: ");
|
||||
* vips_buf_appends (&buf, "Numbers are: ");
|
||||
* for (i = 0; i < array_length; i++) {
|
||||
* if (i > 0)
|
||||
* vips_buf_appends (&buf, ", ");
|
||||
* vips_buf_appendg (&buf, array[i]);
|
||||
* vips_buf_appends (&buf, ", ");
|
||||
* vips_buf_appendg (&buf, array[i]);
|
||||
* }
|
||||
* printf ("%s", vips_buf_all (&buf));
|
||||
* printf ("%s", vips_buf_all (&buf));
|
||||
* ]|
|
||||
*/
|
||||
|
||||
@ -171,7 +171,7 @@ vips_buf_set_static( VipsBuf *buf, char *base, int mx )
|
||||
* char txt[256];
|
||||
* VipsBuf buf;
|
||||
*
|
||||
* vips_buf_init_static (&buf, txt, 256);
|
||||
* vips_buf_init_static (&buf, txt, 256);
|
||||
* ]|
|
||||
*
|
||||
* Static buffers don't need to be freed when they go out of scope, but their
|
||||
@ -227,7 +227,7 @@ vips_buf_set_dynamic( VipsBuf *buf, int mx )
|
||||
* |[
|
||||
* VipsBuf buf;
|
||||
*
|
||||
* vips_buf_init_synamic (&buf, 256);
|
||||
* vips_buf_init_synamic (&buf, 256);
|
||||
* ]|
|
||||
*
|
||||
* Dynamic buffers must be freed with vips_buf_destroy(), but their size can
|
||||
|
@ -45,7 +45,7 @@
|
||||
* vips_dbuf_init:
|
||||
* @dbuf: the buffer
|
||||
*
|
||||
* Initialize a buffer.
|
||||
* Initialize @dbuf.
|
||||
*/
|
||||
void
|
||||
vips_dbuf_init( VipsDbuf *dbuf )
|
||||
@ -224,7 +224,7 @@ vips_dbuf_reset( VipsDbuf *dbuf )
|
||||
* vips_dbuf_destroy:
|
||||
* @dbuf: the buffer
|
||||
*
|
||||
* Destroy a buffer. This frees any allocated memory.
|
||||
* Destroy @dbuf. This frees any allocated memory.
|
||||
*/
|
||||
void
|
||||
vips_dbuf_destroy( VipsDbuf *dbuf )
|
||||
|
@ -84,8 +84,7 @@
|
||||
* uniform way.
|
||||
*
|
||||
* Use vips_image_get_typeof() to test for the
|
||||
* existance and #GType
|
||||
* of a header field.
|
||||
* existance and #GType of a header field.
|
||||
*
|
||||
* You can attach arbitrary metadata to images. Metadata is copied as images
|
||||
* are processed, so all images which used this image as input, directly or
|
||||
@ -945,10 +944,10 @@ vips__image_copy_fields_array( VipsImage *out, VipsImage *in[] )
|
||||
* |[
|
||||
* GValue value = { 0 };
|
||||
*
|
||||
* g_value_init (&value, G_TYPE_INT);
|
||||
* g_value_set_int (&value, 42);
|
||||
* vips_image_set (image, name, &value);
|
||||
* g_value_unset (&value);
|
||||
* g_value_init (&value, G_TYPE_INT);
|
||||
* g_value_set_int (&value, 42);
|
||||
* vips_image_set (image, name, &value);
|
||||
* g_value_unset (&value);
|
||||
* ]|
|
||||
*
|
||||
* See also: vips_image_get().
|
||||
@ -1025,20 +1024,20 @@ vips_set_value_from_pointer( GValue *value, void *data )
|
||||
* GValue value = { 0 };
|
||||
* double d;
|
||||
*
|
||||
* if (vips_image_get (image, name, &value))
|
||||
* if (vips_image_get (image, name, &value))
|
||||
* return -1;
|
||||
*
|
||||
* if (G_VALUE_TYPE (&value) != G_TYPE_DOUBLE) {
|
||||
* if (G_VALUE_TYPE (&value) != G_TYPE_DOUBLE) {
|
||||
* vips_error( "mydomain",
|
||||
* _("field \"%s\" is of type %s, not double"),
|
||||
* name,
|
||||
* g_type_name (G_VALUE_TYPE (&value)));
|
||||
* g_value_unset (&value);
|
||||
* g_type_name (G_VALUE_TYPE (&value)));
|
||||
* g_value_unset (&value);
|
||||
* return -1;
|
||||
* }
|
||||
*
|
||||
* d = g_value_get_double (&value);
|
||||
* g_value_unset (&value);
|
||||
* d = g_value_get_double (&value);
|
||||
* g_value_unset (&value);
|
||||
* ]|
|
||||
*
|
||||
* See also: vips_image_get_typeof(), vips_image_get_double().
|
||||
@ -1421,23 +1420,23 @@ vips_image_get_int( const VipsImage *image, const char *name, int *out )
|
||||
/**
|
||||
* vips_image_set_int: (method)
|
||||
* @image: image to attach the metadata to
|
||||
* @field: metadata name
|
||||
* @name: metadata name
|
||||
* @i: metadata value
|
||||
*
|
||||
* Attaches @i as a metadata item on @image under the name @field. A
|
||||
* Attaches @i as a metadata item on @image under the name @name. A
|
||||
* convenience
|
||||
* function over vips_image_set().
|
||||
*
|
||||
* See also: vips_image_get_int(), vips_image_set()
|
||||
*/
|
||||
void
|
||||
vips_image_set_int( VipsImage *image, const char *field, int i )
|
||||
vips_image_set_int( VipsImage *image, const char *name, int i )
|
||||
{
|
||||
GValue value = { 0 };
|
||||
|
||||
g_value_init( &value, G_TYPE_INT );
|
||||
g_value_set_int( &value, i );
|
||||
vips_image_set( image, field, &value );
|
||||
vips_image_set( image, name, &value );
|
||||
g_value_unset( &value );
|
||||
}
|
||||
|
||||
@ -1471,23 +1470,23 @@ vips_image_get_double( const VipsImage *image, const char *name, double *out )
|
||||
/**
|
||||
* vips_image_set_double: (method)
|
||||
* @image: image to attach the metadata to
|
||||
* @field: metadata name
|
||||
* @name: metadata name
|
||||
* @d: metadata value
|
||||
*
|
||||
* Attaches @d as a metadata item on @image under the name @field. A
|
||||
* Attaches @d as a metadata item on @image as @name. A
|
||||
* convenience
|
||||
* function over vips_image_set().
|
||||
*
|
||||
* See also: vips_image_get_double(), vips_image_set()
|
||||
*/
|
||||
void
|
||||
vips_image_set_double( VipsImage *image, const char *field, double d )
|
||||
vips_image_set_double( VipsImage *image, const char *name, double d )
|
||||
{
|
||||
GValue value = { 0 };
|
||||
|
||||
g_value_init( &value, G_TYPE_DOUBLE );
|
||||
g_value_set_double( &value, d );
|
||||
vips_image_set( image, field, &value );
|
||||
vips_image_set( image, name, &value );
|
||||
g_value_unset( &value );
|
||||
}
|
||||
|
||||
@ -1537,33 +1536,33 @@ vips_image_get_string( const VipsImage *image, const char *name,
|
||||
/**
|
||||
* vips_image_set_string: (method)
|
||||
* @image: image to attach the metadata to
|
||||
* @field: metadata name
|
||||
* @name: metadata name
|
||||
* @str: metadata value
|
||||
*
|
||||
* Attaches @str as a metadata item on @image under the name @field.
|
||||
* Attaches @str as a metadata item on @image as @name.
|
||||
* A convenience
|
||||
* function over vips_image_set() using an vips_ref_string.
|
||||
*
|
||||
* See also: vips_image_get_double(), vips_image_set(), vips_ref_string
|
||||
*/
|
||||
void
|
||||
vips_image_set_string( VipsImage *image, const char *field, const char *str )
|
||||
vips_image_set_string( VipsImage *image, const char *name, const char *str )
|
||||
{
|
||||
GValue value = { 0 };
|
||||
|
||||
g_value_init( &value, VIPS_TYPE_REF_STRING );
|
||||
vips_value_set_ref_string( &value, str );
|
||||
vips_image_set( image, field, &value );
|
||||
vips_image_set( image, name, &value );
|
||||
g_value_unset( &value );
|
||||
}
|
||||
|
||||
/**
|
||||
* vips_image_get_as_string: (method)
|
||||
* @image: image to get the header field from
|
||||
* @field: field name
|
||||
* @name: field name
|
||||
* @out: (transfer full): return field value as string
|
||||
*
|
||||
* Gets @out from @im under the name @field.
|
||||
* Returns @name from @image in @out.
|
||||
* This function will read any field, returning it as a printable string.
|
||||
* You need to free the string with g_free() when you are done with it.
|
||||
*
|
||||
@ -1576,12 +1575,12 @@ vips_image_set_string( VipsImage *image, const char *field, const char *str )
|
||||
*/
|
||||
int
|
||||
vips_image_get_as_string( const VipsImage *image,
|
||||
const char *field, char **out )
|
||||
const char *name, char **out )
|
||||
{
|
||||
GValue value = { 0 };
|
||||
GType type;
|
||||
|
||||
if( vips_image_get( image, field, &value ) )
|
||||
if( vips_image_get( image, name, &value ) )
|
||||
return( -1 );
|
||||
|
||||
/* Display the save form, if there is one. This way we display
|
||||
@ -1608,21 +1607,21 @@ vips_image_get_as_string( const VipsImage *image,
|
||||
/**
|
||||
* vips_image_print_field: (method)
|
||||
* @image: image to get the header field from
|
||||
* @field: field name
|
||||
* @name: field name
|
||||
*
|
||||
* Prints a field to stdout as ASCII. Handy for debugging.
|
||||
* Prints field @name to stdout as ASCII. Handy for debugging.
|
||||
*/
|
||||
void
|
||||
vips_image_print_field( const VipsImage *image, const char *field )
|
||||
vips_image_print_field( const VipsImage *image, const char *name )
|
||||
{
|
||||
char *str;
|
||||
|
||||
if( vips_image_get_as_string( image, field, &str ) ) {
|
||||
if( vips_image_get_as_string( image, name, &str ) ) {
|
||||
printf( "vips_image_print_field: unable to read field\n" );
|
||||
return;
|
||||
}
|
||||
|
||||
printf( ".%s: %s\n", field, str );
|
||||
printf( ".%s: %s\n", name, str );
|
||||
|
||||
g_free( str );
|
||||
}
|
||||
|
@ -2268,7 +2268,7 @@ vips_object_set_valist( VipsObject *object, va_list ap )
|
||||
* |[
|
||||
* vips_object_set (operation,
|
||||
* "input", in,
|
||||
* "output", &out,
|
||||
* "output", &out,
|
||||
* NULL);
|
||||
* ]|
|
||||
*
|
||||
@ -2908,9 +2908,9 @@ vips_object_local_array_cb( GObject *parent, VipsObjectLocal *local )
|
||||
*
|
||||
* t = vips_object_local_array( a, 5 );
|
||||
* if(
|
||||
* vips_add( a, b, &t[0], NULL ) ||
|
||||
* vips_invert( t[0], &t[1], NULL ) ||
|
||||
* vips_add( t[1], t[0], &t[2], NULL ) ||
|
||||
* vips_add( a, b, &t[0], NULL ) ||
|
||||
* vips_invert( t[0], &t[1], NULL ) ||
|
||||
* vips_add( t[1], t[0], &t[2], NULL ) ||
|
||||
* vips_costra( t[2], out, NULL ) )
|
||||
* return( -1 );
|
||||
* ]|
|
||||
|
@ -102,7 +102,7 @@
|
||||
* VipsImage *im = ...;
|
||||
* VipsImage *t1;
|
||||
*
|
||||
* if (vips_invert (im, &t1, NULL))
|
||||
* if (vips_invert (im, &t1, NULL))
|
||||
* error ..
|
||||
* ]|
|
||||
*
|
||||
@ -122,13 +122,13 @@
|
||||
* VipsImage *im = ...;
|
||||
* VipsImage *t1, *t2;
|
||||
*
|
||||
* if (vips_invert (im, &t1, NULL)) {
|
||||
* if (vips_invert (im, &t1, NULL)) {
|
||||
* g_object_unref (im);
|
||||
* return -1;
|
||||
* }
|
||||
* g_object_unref (im);
|
||||
*
|
||||
* if (vips_flip (t1, &t2, VIPS_DIRECTION_HORIZONTAL, NULL)) {
|
||||
* if (vips_flip (t1, &t2, VIPS_DIRECTION_HORIZONTAL, NULL)) {
|
||||
* g_object_unref (t1);
|
||||
* return -1;
|
||||
* }
|
||||
@ -143,8 +143,8 @@
|
||||
* VipsImage *im = ...;
|
||||
* VipsImage *t = (VipsImage **) vips_object_local_array (parent, 2);
|
||||
*
|
||||
* if (vips_invert (im, &t[0], NULL) ||
|
||||
* vips_flip (t[0], &t[1], VIPS_DIRECTION_HORIZONTAL, NULL))
|
||||
* if (vips_invert (im, &t[0], NULL) ||
|
||||
* vips_flip (t[0], &t[1], VIPS_DIRECTION_HORIZONTAL, NULL))
|
||||
* return -1;
|
||||
* ]|
|
||||
*
|
||||
@ -953,7 +953,7 @@ vips_call_by_name( const char *operation_name,
|
||||
* VipsImage *in = ...
|
||||
* VipsImage *out;
|
||||
*
|
||||
* if( vips_call( "embed", in, &out, 10, 10, 100, 100,
|
||||
* if( vips_call( "embed", in, &out, 10, 10, 100, 100,
|
||||
* "extend", VIPS_EXTEND_COPY,
|
||||
* NULL ) )
|
||||
* ... error
|
||||
|
@ -828,7 +828,7 @@ vips_region_region( VipsRegion *reg,
|
||||
* Do two regions point to the same piece of image? ie.
|
||||
*
|
||||
* |[
|
||||
* VIPS_REGION_ADDR( reg1, x, y ) == VIPS_REGION_ADDR( reg2, x, y ) &&
|
||||
* VIPS_REGION_ADDR( reg1, x, y ) == VIPS_REGION_ADDR( reg2, x, y ) &&
|
||||
* *VIPS_REGION_ADDR( reg1, x, y ) ==
|
||||
* *VIPS_REGION_ADDR( reg2, x, y ) for all x, y, reg1, reg2.
|
||||
* ]|
|
||||
|
@ -371,10 +371,10 @@ vips_system_init( VipsSystem *system )
|
||||
*
|
||||
* if (vips_system ("convert %s -swirl 45 %s",
|
||||
* "in", in,
|
||||
* "out", &out,
|
||||
* "out", &out,
|
||||
* "in_format", "%s.jpg",
|
||||
* "out_format", "%s.jpg",
|
||||
* "log", &log,
|
||||
* "log", &log,
|
||||
* NULL))
|
||||
* error ...
|
||||
* ]|
|
||||
|
@ -65,6 +65,67 @@
|
||||
* The resampling kernels vips supports. See vips_reduce(), for example.
|
||||
*/
|
||||
|
||||
/* gtk-doc does not see comments in C++ files, so we have these docs here.
|
||||
*/
|
||||
|
||||
/**
|
||||
* vips_reducev: (method)
|
||||
* @in: input image
|
||||
* @out: (out): output image
|
||||
* @vshrink: vertical reduce
|
||||
* @...: %NULL-terminated list of optional named arguments
|
||||
*
|
||||
* Optional arguments:
|
||||
*
|
||||
* * @kernel: #VipsKernel to use to interpolate (default: lanczos3)
|
||||
* * @centre: %gboolean use centre rather than corner sampling convention
|
||||
*
|
||||
* Reduce @in vertically by a float factor. The pixels in @out are
|
||||
* interpolated with a 1D mask generated by @kernel.
|
||||
*
|
||||
* Set @centre to use centre rather than corner sampling convention. Centre
|
||||
* convention can be useful to match the behaviour of other systems.
|
||||
*
|
||||
* This is a very low-level operation: see vips_resize() for a more
|
||||
* convenient way to resize images.
|
||||
*
|
||||
* This operation does not change xres or yres. The image resolution needs to
|
||||
* be updated by the application.
|
||||
*
|
||||
* See also: vips_shrink(), vips_resize(), vips_affine().
|
||||
*
|
||||
* Returns: 0 on success, -1 on error
|
||||
*/
|
||||
|
||||
/**
|
||||
* vips_reduceh: (method)
|
||||
* @in: input image
|
||||
* @out: (out): output image
|
||||
* @hshrink: horizontal reduce
|
||||
* @...: %NULL-terminated list of optional named arguments
|
||||
*
|
||||
* Optional arguments:
|
||||
*
|
||||
* * @kernel: #VipsKernel to use to interpolate (default: lanczos3)
|
||||
* * @centre: %gboolean use centre rather than corner sampling convention
|
||||
*
|
||||
* Reduce @in horizontally by a float factor. The pixels in @out are
|
||||
* interpolated with a 1D mask generated by @kernel.
|
||||
*
|
||||
* Set @centre to use centre rather than corner sampling convention. Centre
|
||||
* convention can be useful to match the behaviour of other systems.
|
||||
*
|
||||
* This is a very low-level operation: see vips_resize() for a more
|
||||
* convenient way to resize images.
|
||||
*
|
||||
* This operation does not change xres or yres. The image resolution needs to
|
||||
* be updated by the application.
|
||||
*
|
||||
* See also: vips_shrink(), vips_resize(), vips_affine().
|
||||
*
|
||||
* Returns: 0 on success, -1 on error
|
||||
*/
|
||||
|
||||
typedef struct _VipsReduce {
|
||||
VipsResample parent_instance;
|
||||
|
||||
|
@ -597,34 +597,9 @@ vips_reduceh_init( VipsReduceh *reduceh )
|
||||
reduceh->kernel = VIPS_KERNEL_LANCZOS3;
|
||||
}
|
||||
|
||||
/**
|
||||
* vips_reduceh: (method)
|
||||
* @in: input image
|
||||
* @out: (out): output image
|
||||
* @hshrink: horizontal reduce
|
||||
* @...: %NULL-terminated list of optional named arguments
|
||||
*
|
||||
* Optional arguments:
|
||||
*
|
||||
* * @kernel: #VipsKernel to use to interpolate (default: lanczos3)
|
||||
* * @centre: %gboolean use centre rather than corner sampling convention
|
||||
*
|
||||
* Reduce @in horizontally by a float factor. The pixels in @out are
|
||||
* interpolated with a 1D mask generated by @kernel.
|
||||
*
|
||||
* Set @centre to use centre rather than corner sampling convention. Centre
|
||||
* convention can be useful to match the behaviour of other systems.
|
||||
*
|
||||
* This is a very low-level operation: see vips_resize() for a more
|
||||
* convenient way to resize images.
|
||||
*
|
||||
* This operation does not change xres or yres. The image resolution needs to
|
||||
* be updated by the application.
|
||||
*
|
||||
* See also: vips_shrink(), vips_resize(), vips_affine().
|
||||
*
|
||||
* Returns: 0 on success, -1 on error
|
||||
/* See reduce.c for the doc comment.
|
||||
*/
|
||||
|
||||
int
|
||||
vips_reduceh( VipsImage *in, VipsImage **out, double hshrink, ... )
|
||||
{
|
||||
|
@ -963,34 +963,9 @@ vips_reducev_init( VipsReducev *reducev )
|
||||
reducev->kernel = VIPS_KERNEL_LANCZOS3;
|
||||
}
|
||||
|
||||
/**
|
||||
* vips_reducev: (method)
|
||||
* @in: input image
|
||||
* @out: (out): output image
|
||||
* @vshrink: vertical reduce
|
||||
* @...: %NULL-terminated list of optional named arguments
|
||||
*
|
||||
* Optional arguments:
|
||||
*
|
||||
* * @kernel: #VipsKernel to use to interpolate (default: lanczos3)
|
||||
* * @centre: %gboolean use centre rather than corner sampling convention
|
||||
*
|
||||
* Reduce @in vertically by a float factor. The pixels in @out are
|
||||
* interpolated with a 1D mask generated by @kernel.
|
||||
*
|
||||
* Set @centre to use centre rather than corner sampling convention. Centre
|
||||
* convention can be useful to match the behaviour of other systems.
|
||||
*
|
||||
* This is a very low-level operation: see vips_resize() for a more
|
||||
* convenient way to resize images.
|
||||
*
|
||||
* This operation does not change xres or yres. The image resolution needs to
|
||||
* be updated by the application.
|
||||
*
|
||||
* See also: vips_shrink(), vips_resize(), vips_affine().
|
||||
*
|
||||
* Returns: 0 on success, -1 on error
|
||||
/* See reduce.c for the doc comment.
|
||||
*/
|
||||
|
||||
int
|
||||
vips_reducev( VipsImage *in, VipsImage **out, double vshrink, ... )
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user