diff --git a/TODO b/TODO index abc27fcc..33ecf8c1 100644 --- a/TODO +++ b/TODO @@ -1,11 +1,3 @@ - -- does vips_interpolate_binlinear_static() stioll exist? add a note to - VipsInterpolate.3 if it does - - manual too? - -- im_gauss_imask_sep needs docs, C++ docs as well - WONTFIX for 7.18 ================ diff --git a/doc/src/interpolate.tex b/doc/src/interpolate.tex index dfefc7a2..17148cdf 100644 --- a/doc/src/interpolate.tex +++ b/doc/src/interpolate.tex @@ -132,3 +132,32 @@ VipsInterpolateMethod You can build an instance of a \verb+VipsInterpolator+ with the \verb+vips_object_*()+ family of functions, see \pref{sec:object}. + +Convenience functions return a static instance of one of the standard +interpolators: + +\begin{verbatim} +VipsInterpolate *vips_interpolate_nearest_static( void ); +VipsInterpolate *vips_interpolate_bilinear_static( void ); +VipsInterpolate *vips_interpolate_bicubic_static( void ); +\end{verbatim} + +\noindent +Don't free the result. + +Finally, \verb+vips_interpolate_new()+ makes a \verb+VipsInterpolate+ from a +nickname: + +\begin{verbatim} +VipsInterpolate *vips_interpolate_new( const char *nickname ); +\end{verbatim} + +For example: + +\begin{verbatim} +VipsInterpolate *interpolate = vips_interpolate_new( "nohalo" ); +\end{verbatim} + +\noindent +You must drop your ref after you're done with the object with +\verb+g_object_unref()+. diff --git a/doc/src/vmask.tex b/doc/src/vmask.tex index 4f0a8871..57b5ce0c 100644 --- a/doc/src/vmask.tex +++ b/doc/src/vmask.tex @@ -129,6 +129,7 @@ operator VImage(); // Build gaussian and log masks static VIMask gauss( double, double ); +static VIMask gauss_sep( double, double ); static VIMask log( double, double ); // Rotate diff --git a/man/Makefile.am b/man/Makefile.am index cc1fb99d..0c776f32 100644 --- a/man/Makefile.am +++ b/man/Makefile.am @@ -205,6 +205,7 @@ man_MANS = \ im_gammacorrect.3 \ im_gauss_dmask.3 \ im_gauss_imask.3 \ + im_gauss_imask_sep.3 \ im_gaussnoise.3 \ im_gbandjoin.3 \ im_generate.3 \ diff --git a/man/VipsInterpolate.3 b/man/VipsInterpolate.3 index 0dae44c7..34747f93 100644 --- a/man/VipsInterpolate.3 +++ b/man/VipsInterpolate.3 @@ -33,6 +33,14 @@ VipsInterpolateMethod vips_interpolate_get_method( VipsInterpolate * ); .br int vips_interpolate_get_window_size( VipsInterpolate *interpolate ); +VipsInterpolate *vips_interpolate_nearest_static( void ); +.br +VipsInterpolate *vips_interpolate_bilinear_static( void ); +.br +VipsInterpolate *vips_interpolate_bicubic_static( void ); + +VipsInterpolate *vips_interpolate_new( const char *nickname ); + .SH DESCRIPTION .B VipsInterpolate is the base class for VIPS interpolators. It provides a simple framework that @@ -58,6 +66,22 @@ either calls or if it is NULL, returns .B window_size. +.B vips_interpolate_nearest_static(3), +.B vips_interpolate_bilinear_static(3) +and +.B vips_interpolate_bicubic_static(3) +are convenience functions which return a pointer to a static instance of a +nearest-neighbour, bilinear and bicubic interpolator. You can pass these to +any function which needs a +.B VipsInterpolator +as an argument. No need to free the result. + +.B vips_interpolate_new(3) +is a convenience function which makes an interpolator from a nickname. Free +the result with +.B g_object_unref(3) +when you're done with it. + .SH SUPPORTED INTERPOLATORS You can list the supported interpolators with diff --git a/man/im_gauss_dmask.3 b/man/im_gauss_dmask.3 index 37c3a33f..e22e257b 100644 --- a/man/im_gauss_dmask.3 +++ b/man/im_gauss_dmask.3 @@ -15,6 +15,13 @@ double sigma, min_amplitude; char *name; .br double sigma, min_amplitude; + +.B INTMASK im_gauss_imask_sep( name, sigma, min_amplitude ) +.br +char *name; +.br +double sigma, min_amplitude; + .SH DESCRIPTION Both functions create a circularly symmetric Gaussian mask of sigma. The size of the mask is determined by the variable min_amplitude; if for instance the @@ -30,17 +37,25 @@ The program uses the following equation: The generated mask has odd size and its maximum value is normalised to either 100 (gauss_imask) or to 1.0 (gauss_dmask). -.B im_gauss_dmask() +.B im_gauss_dmask(3) creates a DOUBLEMASK laplacian of Gaussian mask with maximum value normalised to 1.0. -.B im_gauss_imask() +.B im_gauss_imask(3) creates a INTMASK laplacian of Gaussian mask with maximum value normalised to 100. + +.B im_gauss_imask_sep(3) +returns the centre line of +.B im_gauss_imask(3). +It is convenient for use with +.B im_conv_sep(3) +for building fast gaussian blur or sharpen. + .SH RETURNED VALUE: The functions return NULL on erorr. .SH SEE ALSO -im_log_dmask(3), im_conv(3) +im_log_dmask(3), im_conv(3), im_conv_sep(3). .SH COPYRIGHT .br N. Dessipris diff --git a/man/im_gauss_imask_sep.3 b/man/im_gauss_imask_sep.3 new file mode 100644 index 00000000..dca741eb --- /dev/null +++ b/man/im_gauss_imask_sep.3 @@ -0,0 +1 @@ +.so man3/im_gauss_dmask.3