PSImagePlane Struct Reference

Describes the 8-bit plane of pixel data used by the image services callback functions. More...

#include <PIGeneral.h>

Data Fields

void * data
 Pointer to the byte containing the value of the top left pixel.
Rect bounds
 Coordinate systems for the pixels.
int32 rowBytes
 Step values to access individual pixels in a row.
int32 colBytes
 Step values to access individual pixels in a column.

Detailed Description

Describes the 8-bit plane of pixel data used by the image services callback functions.

You can calculate the address of a pixel by using the following algorithm:

    unsigned8 * GetPixelAddress(PSImagePlane * plane, Point pt)
    {
        // should do some bounds checking here!
        return (unsigned8 *)    (((int32) plane->data +
            (pt.v - plane->bounds.top ) * plane->rowBytes +
            (pt.h - plane->bounds.left) * plane->colBytes);
    }

Field Documentation

Pointer to the byte containing the value of the top left pixel.

Coordinate systems for the pixels.

Step values to access individual pixels in a row.

Step values to access individual pixels in a column.


The documentation for this struct was generated from the following file: