Next: 3.2 Opening and closing Up: 3. The VIPS image Previous: 3. The VIPS image Contents

# 3.1 Image descriptors

The base level of the VIPS I/O system provides `IMAGE` descriptors. These operate in a manner analogous to the `FILE` descriptors of the standard C I/O library. An image represented by a descriptor may be an image file on disc, an area of memory that has been allocated for the image, an output file, a delayed computation, and so on. Programs need (usually) only know that they have a descriptor, they do not see many of the details. Figure 3.1 shows the definition of the `IMAGE` descriptor.

Figure 3.1: The `IMAGE` descriptor

The first set of fields simply come from the image file header: see §2.1 for a full description of all the fields. The next set are maintained for you by the VIPS I/O system. `Hist` is a pointer to a string listing all of the operations which have been performed on this image, see §3.3. `filename` is the name of the file that this image came from. `data` usually points to the start of image data. If you have attached an eval callback to this image, `time` points to a set of timing statistics which can be used by user-interfaces built on VIPS to provide feedback about the progress of evaluation -- see §3.4. Finally, if you set `kill` to non-zero, VIPS will block any pipelines which use this descriptor as an intermediate. See §3.8.5.

The remaining fields are private and are used by VIPS for housekeeping.

Next: 3.2 Opening and closing Up: 3. The VIPS image Previous: 3. The VIPS image Contents