2.1 Introduction

This chapter explains how to call VIPS functions from C programs. It does not explain how to write new image processing operations (see §3.1), only how to call the ones that VIPS provides. If you want to call VIPS functions fromC++ programs, you can either use the interface described here or you can try out the much nicer C++ interface described in §1.1.

See §4.1 for an introduction to the image processing operations available in the library. Figure 2.1 tries to show an overview of this structure.


PIC


Figure 2.1: VIPS software architecture

VIPS includes a set of UNIX manual pages. Enter (for example):

example% man im_extract

to get an explanation of the im_extract() function.

All the command-line VIPS operations will print help text too. For example:

example% vips im_extract  
usage: vips im_extract input output  
  left top width height band  
where:  
        input is of type "image"  
        output is of type "image"  
        left is of type "integer"  
        top is of type "integer"  
        width is of type "integer"  
        height is of type "integer"  
        band is of type "integer"  
extract area/band, from package  
  "conversion"  
flags: (PIO function)  
  (coordinate transformer)  
  (area operation)  
  (result can be cached)  
vips: error calling function  
im_run_command: too few arguments