IMAGEDATA - a structure to describe image contents
The structure describe pixel addresses in an image, so that the pixels are accessible to other algorithms. The structure is frequently used in graphical operations and image processing applications (like the FOuCUS and the FourierAnalyzer).
The C/C++ definition is the following:
typedef struct { unsigned char *Address; // the address of the top-left pixel int Type, // pixel type Width, // image width Height, // image height hPitch, // the difference between the vertical pixels (in bytes) vPitch; // -"- horizontal pixels (that is, the lines) } IMAGEDATA; |
The meaning of the structure is the following:
With this, a pixel address can be calculated:
Address = id.Address + id.hPitch*x + id.vPitch*y |
The structure can easily be filled to describe a Device Independent Bitmap (DIB) on Windows, but other libraries are not problematic, either.
Properties, examples:
Attila NAGY | Last updated: 2018-08-30 |