Merge pull request #755 from astavale/gi-updates-for-create

Update GObject introspection annotations for libvips/create directory
This commit is contained in:
John Cupitt 2017-10-03 10:56:59 +01:00 committed by GitHub
commit e0cf15285a
28 changed files with 58 additions and 57 deletions

View File

@ -111,6 +111,7 @@ headers="\
arithmetic.h \ arithmetic.h \
colour.h \ colour.h \
convolution.h \ convolution.h \
create.h \
draw.h \ draw.h \
morphology.h \ morphology.h \
mosaicing.h \ mosaicing.h \

View File

@ -155,7 +155,7 @@ vips_black_init( VipsBlack *black )
/** /**
* vips_black: * vips_black:
* @out: output image * @out: (out): output image
* @width: output width * @width: output width
* @height: output height * @height: output height
* @...: %NULL-terminated list of optional named arguments * @...: %NULL-terminated list of optional named arguments

View File

@ -271,9 +271,9 @@ vips_buildlut_init( VipsBuildlut *lut )
} }
/** /**
* vips_buildlut: * vips_buildlut: (method)
* @in: input matrix * @in: input matrix
* @out: output image * @out: (out): output image
* @...: %NULL-terminated list of optional named arguments * @...: %NULL-terminated list of optional named arguments
* *
* This operation builds a lookup table from a set of points. Intermediate * This operation builds a lookup table from a set of points. Intermediate

View File

@ -116,7 +116,7 @@ vips_eye_init( VipsEye *eye )
/** /**
* vips_eye: * vips_eye:
* @out: output image * @out: (out): output image
* @width: image size * @width: image size
* @height: image size * @height: image size
* @...: %NULL-terminated list of optional named arguments * @...: %NULL-terminated list of optional named arguments

View File

@ -131,7 +131,7 @@ vips_fractsurf_init( VipsFractsurf *fractsurf )
/** /**
* vips_fractsurf: * vips_fractsurf:
* @out: output image * @out: (out): output image
* @width: output width * @width: output width
* @height: output height * @height: output height
* @fractal_dimension: fractal dimension * @fractal_dimension: fractal dimension

View File

@ -227,7 +227,7 @@ vips_gaussmat_init( VipsGaussmat *gaussmat )
/** /**
* vips_gaussmat: * vips_gaussmat:
* @out: output image * @out: (out): output image
* @sigma: standard deviation of mask * @sigma: standard deviation of mask
* @min_ampl: minimum amplitude * @min_ampl: minimum amplitude
* @...: %NULL-terminated list of optional named arguments * @...: %NULL-terminated list of optional named arguments

View File

@ -207,7 +207,7 @@ vips_gaussnoise_init( VipsGaussnoise *gaussnoise )
/** /**
* vips_gaussnoise: * vips_gaussnoise:
* @out: output image * @out: (out): output image
* @width: output width * @width: output width
* @height: output height * @height: output height
* @...: %NULL-terminated list of optional named arguments * @...: %NULL-terminated list of optional named arguments

View File

@ -100,7 +100,7 @@ vips_grey_init( VipsGrey *grey )
/** /**
* vips_grey: * vips_grey:
* @out: output image * @out: (out): output image
* @width: image size * @width: image size
* @height: image size * @height: image size
* @...: %NULL-terminated list of optional named arguments * @...: %NULL-terminated list of optional named arguments

View File

@ -173,7 +173,7 @@ vips_identity_init( VipsIdentity *identity )
/** /**
* vips_identity: * vips_identity:
* @out: output image * @out: (out): output image
* @...: %NULL-terminated list of optional named arguments * @...: %NULL-terminated list of optional named arguments
* *
* Optional arguments: * Optional arguments:

View File

@ -1,7 +1,7 @@
/* invert a lut /* invert a lut
* *
* Written on: 5/6/01 * Written on: 5/6/01
* Modified on : * Modified on :
* *
* 7/7/03 JC * 7/7/03 JC
* - generate image rather than doublemask (arrg) * - generate image rather than doublemask (arrg)
@ -17,7 +17,7 @@
/* /*
This file is part of VIPS. This file is part of VIPS.
VIPS is free software; you can redistribute it and/or modify VIPS is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2 of the License, or the Free Software Foundation; either version 2 of the License, or
@ -65,7 +65,7 @@ typedef struct _VipsInvertlut {
/* Input image. /* Input image.
*/ */
VipsImage *in; VipsImage *in;
/* .. and cast to a matrix. /* .. and cast to a matrix.
*/ */
@ -119,31 +119,31 @@ vips_invertlut_build_init( VipsInvertlut *lut )
int x, y; int x, y;
if( !lut->mat || if( !lut->mat ||
lut->mat->Xsize < 2 || lut->mat->Xsize < 2 ||
lut->mat->Ysize < 1 ) { lut->mat->Ysize < 1 ) {
vips_error( class->nickname, "%s", _( "bad input matrix" ) ); vips_error( class->nickname, "%s", _( "bad input matrix" ) );
return( -1 ); return( -1 );
} }
if( lut->size < 1 || if( lut->size < 1 ||
lut->size > 65536 ) { lut->size > 65536 ) {
vips_error( class->nickname, "%s", _( "bad size" ) ); vips_error( class->nickname, "%s", _( "bad size" ) );
return( -1 ); return( -1 );
} }
if( !(lut->buf = if( !(lut->buf =
VIPS_ARRAY( NULL, lut->size * (lut->mat->Xsize - 1), double )) ) VIPS_ARRAY( NULL, lut->size * (lut->mat->Xsize - 1), double )) )
return( -1 ); return( -1 );
if( !(lut->data = VIPS_ARRAY( NULL, lut->mat->Ysize, double * )) ) if( !(lut->data = VIPS_ARRAY( NULL, lut->mat->Ysize, double * )) )
return( -1 ); return( -1 );
for( y = 0; y < lut->mat->Ysize; y++ ) for( y = 0; y < lut->mat->Ysize; y++ )
lut->data[y] = VIPS_MATRIX( lut->mat, 0, y ); lut->data[y] = VIPS_MATRIX( lut->mat, 0, y );
/* Sanity check for data range. /* Sanity check for data range.
*/ */
for( y = 0; y < lut->mat->Ysize; y++ ) for( y = 0; y < lut->mat->Ysize; y++ )
for( x = 0; x < lut->mat->Xsize; x++ ) for( x = 0; x < lut->mat->Xsize; x++ )
if( lut->data[y][x] > 1.0 || if( lut->data[y][x] > 1.0 ||
lut->data[y][x] < 0.0 ) { lut->data[y][x] < 0.0 ) {
vips_error( class->nickname, vips_error( class->nickname,
_( "element (%d, %d) is %g, " _( "element (%d, %d) is %g, "
@ -204,10 +204,10 @@ vips_invertlut_build_create( VipsInvertlut *lut )
/* Inside the loop to avoid /0 errors for last == /* Inside the loop to avoid /0 errors for last ==
* (size - 1). * (size - 1).
*/ */
double fac = (1 - lut->data[height - 1][0]) / double fac = (1 - lut->data[height - 1][0]) /
((lut->size - 1) - last); ((lut->size - 1) - last);
lut->buf[b + k * bands] = lut->buf[b + k * bands] =
lut->data[height - 1][0] + (k - last) * fac; lut->data[height - 1][0] + (k - last) * fac;
} }
@ -255,17 +255,17 @@ vips_invertlut_build( VipsObject *object )
return( -1 ); return( -1 );
if( vips_check_matrix( class->nickname, lut->in, &lut->mat ) ) if( vips_check_matrix( class->nickname, lut->in, &lut->mat ) )
return( -1 ); return( -1 );
if( vips_invertlut_build_init( lut ) || if( vips_invertlut_build_init( lut ) ||
vips_invertlut_build_create( lut ) ) vips_invertlut_build_create( lut ) )
return( -1 ); return( -1 );
vips_image_init_fields( create->out, vips_image_init_fields( create->out,
lut->size, 1, lut->mat->Xsize - 1, lut->size, 1, lut->mat->Xsize - 1,
VIPS_FORMAT_DOUBLE, VIPS_CODING_NONE, VIPS_FORMAT_DOUBLE, VIPS_CODING_NONE,
VIPS_INTERPRETATION_HISTOGRAM, 1.0, 1.0 ); VIPS_INTERPRETATION_HISTOGRAM, 1.0, 1.0 );
if( vips_image_write_line( create->out, 0, (VipsPel *) lut->buf ) ) if( vips_image_write_line( create->out, 0, (VipsPel *) lut->buf ) )
return( -1 ); return( -1 );
return( 0 ); return( 0 );
@ -285,14 +285,14 @@ vips_invertlut_class_init( VipsInvertlutClass *class )
vobject_class->description = _( "build an inverted look-up table" ); vobject_class->description = _( "build an inverted look-up table" );
vobject_class->build = vips_invertlut_build; vobject_class->build = vips_invertlut_build;
VIPS_ARG_IMAGE( class, "in", 0, VIPS_ARG_IMAGE( class, "in", 0,
_( "Input" ), _( "Input" ),
_( "Matrix of XY coordinates" ), _( "Matrix of XY coordinates" ),
VIPS_ARGUMENT_REQUIRED_INPUT, VIPS_ARGUMENT_REQUIRED_INPUT,
G_STRUCT_OFFSET( VipsInvertlut, in ) ); G_STRUCT_OFFSET( VipsInvertlut, in ) );
VIPS_ARG_INT( class, "size", 5, VIPS_ARG_INT( class, "size", 5,
_( "Size" ), _( "Size" ),
_( "LUT size to generate" ), _( "LUT size to generate" ),
VIPS_ARGUMENT_OPTIONAL_INPUT, VIPS_ARGUMENT_OPTIONAL_INPUT,
G_STRUCT_OFFSET( VipsInvertlut, size ), G_STRUCT_OFFSET( VipsInvertlut, size ),
@ -303,13 +303,13 @@ vips_invertlut_class_init( VipsInvertlutClass *class )
static void static void
vips_invertlut_init( VipsInvertlut *lut ) vips_invertlut_init( VipsInvertlut *lut )
{ {
lut->size = 256; lut->size = 256;
} }
/** /**
* vips_invertlut: * vips_invertlut: (method)
* @in: input mask * @in: input mask
* @out: output LUT * @out: (out): output LUT
* @...: %NULL-terminated list of optional named arguments * @...: %NULL-terminated list of optional named arguments
* *
* Optional arguments: * Optional arguments:
@ -320,9 +320,9 @@ vips_invertlut_init( VipsInvertlut *lut )
* will map reals to targets. Handy for linearising images from * will map reals to targets. Handy for linearising images from
* measurements of a colour chart. All values in [0,1]. Piecewise linear * measurements of a colour chart. All values in [0,1]. Piecewise linear
* interpolation, extrapolate head and tail to 0 and 1. * interpolation, extrapolate head and tail to 0 and 1.
* *
* Eg. input like this: * Eg. input like this:
* *
* <tgroup cols='4' align='left' colsep='1' rowsep='1'> * <tgroup cols='4' align='left' colsep='1' rowsep='1'>
* <tbody> * <tbody>
* <row> * <row>
@ -352,12 +352,12 @@ vips_invertlut_init( VipsInvertlut *lut )
* *
* Means a patch with 10% reflectance produces an image with 20% in * Means a patch with 10% reflectance produces an image with 20% in
* channel 1, 30% in channel 2, and 10% in channel 3, and so on. * channel 1, 30% in channel 2, and 10% in channel 3, and so on.
* *
* Inputs don't need to be sorted (we do that). Generate any precision * Inputs don't need to be sorted (we do that). Generate any precision
* LUT, default to 256 elements. * LUT, default to 256 elements.
* *
* It won't work too well for non-monotonic camera responses * It won't work too well for non-monotonic camera responses
* (we should fix this). Interpolation is simple piecewise linear; we ought to * (we should fix this). Interpolation is simple piecewise linear; we ought to
* do something better really. * do something better really.
* *
* See also: vips_buildlut(). * See also: vips_buildlut().

View File

@ -244,7 +244,7 @@ vips_logmat_init( VipsLogmat *logmat )
/** /**
* vips_logmat: * vips_logmat:
* @out: output image * @out: (out): output image
* @sigma: standard deviation of mask * @sigma: standard deviation of mask
* @min_ampl: minimum amplitude * @min_ampl: minimum amplitude
* @...: %NULL-terminated list of optional named arguments * @...: %NULL-terminated list of optional named arguments

View File

@ -117,7 +117,7 @@ vips_mask_butterworth_init( VipsMaskButterworth *butterworth )
/** /**
* vips_mask_butterworth: * vips_mask_butterworth:
* @out: output image * @out: (out): output image
* @width: image size * @width: image size
* @height: image size * @height: image size
* @order: filter order * @order: filter order

View File

@ -159,7 +159,7 @@ vips_mask_butterworth_band_init(
/** /**
* vips_mask_butterworth_band: * vips_mask_butterworth_band:
* @out: output image * @out: (out): output image
* @width: image size * @width: image size
* @height: image size * @height: image size
* @order: filter order * @order: filter order

View File

@ -120,7 +120,7 @@ vips_mask_butterworth_ring_init(
/** /**
* vips_mask_butterworth_ring: * vips_mask_butterworth_ring:
* @out: output image * @out: (out): output image
* @width: image size * @width: image size
* @height: image size * @height: image size
* @order: filter order * @order: filter order

View File

@ -106,7 +106,7 @@ vips_mask_fractal_init( VipsMaskFractal *fractal )
/** /**
* vips_mask_fractal: * vips_mask_fractal:
* @out: output image * @out: (out): output image
* @width: image size * @width: image size
* @height: image size * @height: image size
* @fractal_dimension: fractal dimension * @fractal_dimension: fractal dimension

View File

@ -107,7 +107,7 @@ vips_mask_gaussian_init( VipsMaskGaussian *gaussian )
/** /**
* vips_mask_gaussian: * vips_mask_gaussian:
* @out: output image * @out: (out): output image
* @width: image size * @width: image size
* @height: image size * @height: image size
* @frequency_cutoff: frequency threshold * @frequency_cutoff: frequency threshold

View File

@ -144,7 +144,7 @@ vips_mask_gaussian_band_init( VipsMaskGaussianBand *gaussian_band )
/** /**
* vips_mask_gaussian_band: * vips_mask_gaussian_band:
* @out: output image * @out: (out): output image
* @width: image size * @width: image size
* @height: image size * @height: image size
* @frequency_cutoff_x: band position * @frequency_cutoff_x: band position

View File

@ -114,7 +114,7 @@ vips_mask_gaussian_ring_init( VipsMaskGaussianRing *gaussian_ring )
/** /**
* vips_mask_gaussian_ring: * vips_mask_gaussian_ring:
* @out: output image * @out: (out): output image
* @width: image size * @width: image size
* @height: image size * @height: image size
* @frequency_cutoff: frequency threshold * @frequency_cutoff: frequency threshold

View File

@ -97,7 +97,7 @@ vips_mask_ideal_init( VipsMaskIdeal *ideal )
/** /**
* vips_mask_ideal: * vips_mask_ideal:
* @out: output image * @out: (out): output image
* @width: image size * @width: image size
* @height: image size * @height: image size
* @frequency_cutoff: threshold at which filter ends * @frequency_cutoff: threshold at which filter ends

View File

@ -127,7 +127,7 @@ vips_mask_ideal_band_init( VipsMaskIdealBand *ideal_band )
/** /**
* vips_mask_ideal_band: * vips_mask_ideal_band:
* @out: output image * @out: (out): output image
* @width: image size * @width: image size
* @height: image size * @height: image size
* @frequency_cutoff_x: position of band * @frequency_cutoff_x: position of band

View File

@ -111,7 +111,7 @@ vips_mask_ideal_ring_init( VipsMaskIdealRing *ideal_ring )
/** /**
* vips_mask_ideal_ring: * vips_mask_ideal_ring:
* @out: output image * @out: (out): output image
* @width: image size * @width: image size
* @height: image size * @height: image size
* @frequency_cutoff: threshold at which filter ends * @frequency_cutoff: threshold at which filter ends

View File

@ -331,7 +331,7 @@ vips_perlin_init( VipsPerlin *perlin )
/** /**
* vips_perlin: * vips_perlin:
* @out: output image * @out: (out): output image
* @width: horizontal size * @width: horizontal size
* @height: vertical size * @height: vertical size
* @...: %NULL-terminated list of optional named arguments * @...: %NULL-terminated list of optional named arguments

View File

@ -147,7 +147,7 @@ vips_sines_init( VipsSines *sines )
/** /**
* vips_sines: * vips_sines:
* @out: output image * @out: (out): output image
* @width: image size * @width: image size
* @height: image size * @height: image size
* @...: %NULL-terminated list of optional named arguments * @...: %NULL-terminated list of optional named arguments

View File

@ -335,7 +335,7 @@ vips_text_init( VipsText *text )
/** /**
* vips_text: * vips_text:
* @out: output image * @out: (out): output image
* @text: utf-8 text string to render * @text: utf-8 text string to render
* @...: %NULL-terminated list of optional named arguments * @...: %NULL-terminated list of optional named arguments
* *

View File

@ -310,7 +310,7 @@ vips_tonelut_init( VipsTonelut *lut )
/** /**
* vips_tonelut: * vips_tonelut:
* @out: output image * @out: (out): output image
* @...: %NULL-terminated list of optional named arguments * @...: %NULL-terminated list of optional named arguments
* *
* Optional arguments: * Optional arguments:

View File

@ -337,7 +337,7 @@ vips_worley_init( VipsWorley *worley )
/** /**
* vips_worley: * vips_worley:
* @out: output image * @out: (out): output image
* @width: horizontal size * @width: horizontal size
* @height: vertical size * @height: vertical size
* @...: %NULL-terminated list of optional named arguments * @...: %NULL-terminated list of optional named arguments

View File

@ -239,7 +239,7 @@ vips_xyz_init( VipsXyz *xyz )
/** /**
* vips_xyz: * vips_xyz:
* @out: output image * @out: (out): output image
* @width: horizontal size * @width: horizontal size
* @height: vertical size * @height: vertical size
* @...: %NULL-terminated list of optional named arguments * @...: %NULL-terminated list of optional named arguments

View File

@ -99,7 +99,7 @@ vips_zone_init( VipsZone *zone )
/** /**
* vips_zone: * vips_zone:
* @out: output image * @out: (out): output image
* @width: image size * @width: image size
* @height: image size * @height: image size
* @...: %NULL-terminated list of optional named arguments * @...: %NULL-terminated list of optional named arguments