Please enable JavaScript to view this site.

FALCON/EAGLE user manual 4.62

Syntax

INT is_AllocImageMem (HIDS hf, INT width, INT height, INT bitspixel, char** ppcImgMem, INT* pid)

Description

is_AllocImageMem() allocates image memory for an image with width width and height height and color depth bitspixel. Memory size is at least:

size =[width * ((bitspixel + 1) / 8) + adjust] * height

adjust see below

Line increments are calculated with:

line = width * [(bitspixel + 1) / 8]

lineinc = line + adjust

adjust = 0 when line without rest is devisable by 4

adjust = 4 - rest(line / 4) when line without rest is not devisable by 4

The line increment can be read with the is_GetImgMemPitch() function.

The start address in the image memory is returned with ppcImgMem.

pid contains an identification number of the allocated memory. A newly activated memory location is not directly activated. In other words, images are not directly digitized to this new memory location. Before this can happen, the new memory location has to be activated for recordning snapshots with is_SetImageMem(). After is_SetImageMem() a is_SetImageSize() must follow so that the image conditions can be transferred to the newly activated memory location.

The returned pointer has to be saved and may not be used, as it is required for all further ImageMem functions. The freeing of the memory is achieved with is_FreeImageMem().

In the DirectDraw modes, the allocation of an image memory is not required!

hint_info

Current operating systems swap single, no longer used areas of the main memory to the slower hard disk when free physical main memory is marginal. Therefore the image acquisition can slow down, if more image memory was allocated as can be held in main memory at the same time.

Parameters

hf

Frame grabber handle

width

Width of image

height

Height of image

bitspixel

Color depth of image (bits per pixel)

ppcImgMem

Contains pointer to start of image memory

pid

Contains the ID for image memory

Return value

IS_SUCCESS, IS_NO_SUCCESS