Skip To Content

INTEGRAL

Object Building Guidelines

Bitmap Image Data

Overview

This object represents a raw bitmap. The bitmap's pixels can be stored in BGRA, BGR, GA, G or monochrome format. The Bitmap Image Data object does not have a visual representation, however, it is the key building block used in the construction of the Bitmap Image object.

Designated Rendering Function: NONE

Note: pdImageDataBGR, pdImageDataBGRAlpha, pdImageDataGray and pdImageDataGrayAlpha cannot be used at the same time. pdImageDataBGRAlpha takes precedence over pdImageDataBGR. pdImageDataBGR takes precedence over pdImageDataGrayAlpha. pdImageDataGrayAlpha takes precedence over pdImageDataGray. Finally, pdImageDataGray takes precedence over pdImageDataMono.

None

Properties

pdNw (1039)   PD_WORD_UNSIGNED

Also appears in: Pattern Fill Definition, Grid

Number of items in horizontal direction. Depending on the context, the items can be pixels, rows, grid lines etc.

pdNh (1040)   PD_WORD_UNSIGNED

Also appears in: Pattern Fill Definition, Grid

Number of items in vertical direction. Depending on the context, the items can be pixels, rows, grid lines etc.

pdImageDataRGB (1045)   PD_HEX

Image data in RGB format (variable length, 3 bytes per pixel).

pdImageDataGray (1046)   PD_HEX

Also appears in: Pattern Fill Definition

Image data in grayscale format (variable length, 1 byte per pixel).

pdImageDataRGBAlpha (1095)   PD_HEX

Image data in BGRA (BGR with Alpha) format (variable length, 4 bytes per pixel).

pdImageDataGrayAlpha (1096)   PD_HEX

Image data in the GA (grayscale with Alpha) format (variable length, 2 bytes per pixel).

pdImageDataMono (1129)   PD_HEX

Also appears in: Pattern Fill Definition

Monochrome image data (variable length, 1 byte stores 8 pixels).

pdPitch (1133)   PD_LONG_SIGNED

The distance, in bytes, between the beginning of two neighbouring pixel rows. This property makes it possible to pass to INTEGRAL Engine bitmap images that have some padding (extra bytes) at the end of each bitmap row.

This property works with all supported Bitmap Image Data formats (pdImageDataGray, pdImageDataGrayAlpha, pdImageDataBGR, pdImageDataBGRAlpha) except pdImageDataMono.

A valid pitch value must not be less than pdNw * bytes_per_pixel, where bytes_per_pixel is 1 for pdImageDataGray, 2 for pdImageDataGrayAlpha, 3 for pdImageDataBGR and 4 for pdImageDataBGRAlpha. A pitch value that is exactly pdNw * bytes_per_pixel bytes indicates that the pixel rows are contiguous; in other words there are no extra bytes between the neighbouring pixel rows. A pitch value that is larger than pdNw * bytes_per_pixel bytes indicates that the pixel rows are non contiguous; in other words at the end of each row there are some extra bytes (the number of extra bytes is pdPitch - pdNw * bytes_per_pixel). Note that INTEGRAL Engine does not read or use these extra bytes.

If pdPitch is not specified, INTEGRAL Engine will use the value pdNw * bytes_per_pixel, i.e. assume that pixel rows are contiguous. If pdPitch is not properly defined, INTEGRAL Engine will not be able to display the bitmap image.

Example

▸ demo_program.i