stuff
This commit is contained in:
parent
3e2d56d34f
commit
88019e7b1a
@ -182,13 +182,13 @@ expand () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
expand $libdir
|
expand $libdir
|
||||||
my_libdir=$expanded_value
|
IM_LIBDIR=$expanded_value
|
||||||
|
|
||||||
# vips.c/im_guess_prefix.c need to know the exe suffix and (as a fallback)
|
# vips.c/im_guess_prefix.c need to know the exe suffix and (as a fallback)
|
||||||
# the configure-time install prefix
|
# the configure-time install prefix
|
||||||
AC_DEFINE_UNQUOTED(IM_EXEEXT,"$EXEEXT",[extension for executable files])
|
AC_DEFINE_UNQUOTED(IM_EXEEXT,"$EXEEXT",[extension for executable files])
|
||||||
AC_DEFINE_UNQUOTED(IM_PREFIX,"$prefix",[configure-time install prefix])
|
AC_DEFINE_UNQUOTED(IM_PREFIX,"$prefix",[configure-time install prefix])
|
||||||
AC_DEFINE_UNQUOTED(IM_LIBDIR,"$my_libdir",[configure-time library directory])
|
AC_DEFINE_UNQUOTED(IM_LIBDIR,"$IM_LIBDIR",[configure-time library directory])
|
||||||
|
|
||||||
# i18n
|
# i18n
|
||||||
GETTEXT_PACKAGE=vips-$IM_MAJOR_VERSION.$IM_MINOR_VERSION
|
GETTEXT_PACKAGE=vips-$IM_MAJOR_VERSION.$IM_MINOR_VERSION
|
||||||
|
@ -371,7 +371,7 @@ number of bytes across the region.
|
|||||||
|
|
||||||
\fref{fg:paverage} is a version of \verb+average()+ which uses
|
\fref{fg:paverage} is a version of \verb+average()+ which uses
|
||||||
regions rather than WIO input. Two things: first, we should really be
|
regions rather than WIO input. Two things: first, we should really be
|
||||||
using \verb+im_iterate()+, see \pref{sec:sequence}, to do the rectangle
|
using \verb+vips_sink()+, see \pref{sec:sequence}, to do the rectangle
|
||||||
algebra for us. Secondly, note that we call \verb+im_pincheck()+ rather
|
algebra for us. Secondly, note that we call \verb+im_pincheck()+ rather
|
||||||
than \verb+im_incheck()+. \verb+im_pincheck()+ signals to the IO system
|
than \verb+im_incheck()+. \verb+im_pincheck()+ signals to the IO system
|
||||||
that you are a PIO-aware function, giving \verb+im_prepare()+ much more
|
that you are a PIO-aware function, giving \verb+im_prepare()+ much more
|
||||||
@ -491,13 +491,13 @@ int
|
|||||||
The values \verb+a+ and \verb+b+ are carried around by VIPS for your use.
|
The values \verb+a+ and \verb+b+ are carried around by VIPS for your use.
|
||||||
|
|
||||||
For functions like \verb+average()+ which consume images but produce no image
|
For functions like \verb+average()+ which consume images but produce no image
|
||||||
output, VIPS provides \verb+im_iterate()+. This has type:
|
output, VIPS provides \verb+vips_sink()+. This has type:
|
||||||
|
|
||||||
\begin{verbatim}
|
\begin{verbatim}
|
||||||
int im_iterate( IMAGE *in,
|
int vips_sink( VipsImage *in,
|
||||||
void *(*start_fn)(),
|
VipsStart start,
|
||||||
int (*process_fn)(),
|
VipsGenerate generate,
|
||||||
int (*stop_fn)(),
|
VipsStop stop,
|
||||||
void *a, void *b )
|
void *a, void *b )
|
||||||
\end{verbatim}
|
\end{verbatim}
|
||||||
|
|
||||||
@ -510,11 +510,6 @@ make it possible for the sequences to each contribute to the result of the
|
|||||||
function in an orderly manner, VIPS also guarantees that all start and stop
|
function in an orderly manner, VIPS also guarantees that all start and stop
|
||||||
functions are mutually exclusive.
|
functions are mutually exclusive.
|
||||||
|
|
||||||
A note on types: \verb+<vips/region.h>+ declares prototypes for
|
|
||||||
\verb+im_iterate()+ and \verb+im_generate()+ (see \pref{sec:generate}),
|
|
||||||
but does not give prototypes for the function arguments. This loses a
|
|
||||||
little type-safety, but gains some convenience.
|
|
||||||
|
|
||||||
An example should make this clearer. This version of \verb+average()+
|
An example should make this clearer. This version of \verb+average()+
|
||||||
is very similar to the average function in the VIPS library --- it is only
|
is very similar to the average function in the VIPS library --- it is only
|
||||||
missing polymorphism.
|
missing polymorphism.
|
||||||
@ -626,7 +621,7 @@ average( IMAGE *im, double *out )
|
|||||||
|
|
||||||
/* Loop over the image in pieces, and possibly in parallel.
|
/* Loop over the image in pieces, and possibly in parallel.
|
||||||
*/
|
*/
|
||||||
if( im_iterate( im,
|
if( vips_sink( im,
|
||||||
average_start, average_process, average_stop,
|
average_start, average_process, average_stop,
|
||||||
>otal, NULL ) )
|
>otal, NULL ) )
|
||||||
return( -1 );
|
return( -1 );
|
||||||
@ -651,8 +646,8 @@ There are a couple of variations on \verb+im_prepare()+: you can use
|
|||||||
Regions are written to in just the same way they are read from --- by
|
Regions are written to in just the same way they are read from --- by
|
||||||
writing to a pointer found with the \verb+IM_REGION_ADDR()+ macro.
|
writing to a pointer found with the \verb+IM_REGION_ADDR()+ macro.
|
||||||
|
|
||||||
\verb+im_iterate()+ does input --- \verb+im_generate()+ does output. It
|
\verb+vips_sink()+ does input --- \verb+im_generate()+ does output. It
|
||||||
has the same type as \verb+im_iterate()+:
|
has the same type as \verb+vips_sink()+:
|
||||||
|
|
||||||
\begin{verbatim}
|
\begin{verbatim}
|
||||||
int
|
int
|
||||||
@ -665,7 +660,7 @@ im_generate( IMAGE *out,
|
|||||||
|
|
||||||
The region given to the process function is ready for output. Each time
|
The region given to the process function is ready for output. Each time
|
||||||
the process function is called, it should fill in the pels in the region
|
the process function is called, it should fill in the pels in the region
|
||||||
it was given. Note that, unlike \verb+im_iterate()+, the areas the process
|
it was given. Note that, unlike \verb+vips_sink()+, the areas the process
|
||||||
function is asked to produce are not guaranteed to be either disjoint or
|
function is asked to produce are not guaranteed to be either disjoint or
|
||||||
complete. Again, VIPS may start up many process functions if it sees fit.
|
complete. Again, VIPS may start up many process functions if it sees fit.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user