next up previous contents
Next: Image creation/destruction Up: The Image Package Previous: Image formats and types   Contents


Simple image/pixel routines

To minimise computational overheads, Gandalf provides a common set of low level image and pixel handling routines specific to each supported format and type of image. We will illustrate the routines with reference to two representative examples:
  1. Grey-level signed short integer images. The format here is GAN_GREY_LEVEL_IMAGE, and the type is GAN_SHORT. To use the routines specific to this format and type use the header file
          #include <gandalf/image/image_gl_short.h>
    
  2. RGB colour unsigned character images. The format here is GAN_RGB_COLOUR_IMAGE, and the type is GAN_UCHAR. To use the routines specific to this format and type use the header file
          #include <gandalf/image/image_rgb_uchar.h>
    
We need to use two examples because the way that pixels are handled for simple grey-level images is different to RGB colour and other image formats, since in the latter and related formats (every format except grey-level) a pixel is represented as a structure rather than a simple C object.

There are also higher level routines that work with all the formats and types, accessible through the header file.

      #include <gandalf/image/image_rgb_uchar.h>
Examples of these are also provided in the following sections.



Subsections
next up previous contents
Next: Image creation/destruction Up: The Image Package Previous: Image formats and types   Contents
2006-03-17