As an example, figure 3.3 will print the width and height of an image stored on disc.
To compile this example, use:
cc `pkg-config vips-7.10 --cflags --libs` myfunc.c
As a slightly more complicated example, figure 3.3 will calculate the photographic negative of an image.
The call to im_updatehist() adds a line to the Hist field in
out, noting the invocation of this program, its arguments, and the
time and date at which it was run. It is the application's responsibility
to keep Hist up-to-date -- the image processing functions do not
use this field. You may also find im_histlin() helpful. It has type:
void im_histlin( IMAGE *im, const char *fmt, ... )
It formats its arguments as printf() and appends the string formed
to the Hist string.