Please enable JavaScript to view this site.

uEye .NET Manual 4.97

Class

uEye.Memory

Accessible

Camera.Memory.Allocate

Syntax

uEye.Memory.Allocate()

uEye.Memory.Allocate(bool bActive)

uEye.Memory.Allocate(out int s32MemId, bool bSetAsActiveMem)

uEye.Memory.Allocate(int s32Width, int s32Height)

uEye.Memory.Allocate(int s32Width, int s32Height, int s32BitsPerPixel)

uEye.Memory.Allocate(int s23Width, int s32Height, int s32BitsPerPixel, bool bSetActive, out int s32MemId)

uEye.Memory.Allocate(int s32Width, int s32Height, int s32BitsPerPixel, out int s32MemId)

uEye.Memory.Allocate(int s32Width, int s32Height, int s32BitsPerPixel, System.IntPtr allocated, out int s32MemId)

uEye.Memory.Allocate(uEye.Types.Size<int> size)

uEye.Memory.Allocate(uEye.Types.Size<int> size, int s32BitsPerPixel)

Description

Allocates an image memory for an image having its dimensions defined by s32Width and s32height and its color depth defined by s32BitsPerPixel. The memory size is at least:

size = [s32Width * ((s32BitsPerPixel + 7) / 8)] * s32Height

The line increment is calculated as:

lineinc = s32Width * [(s32BitsPerPixel + 7) / 8]

To read out the line increment, you can use the GetPitch() method.

RGB16 and RGB15 require the same amount of memory, but can be distinguished by the s32BitsPerPixel parameter. For information on the bit depths of different color formats please refer to the Appendix: "Color and memory formats" in the uEye manual.

hint_info

In the Direct3D modes, image memory allocation is not necessary.

In case the operating system is short of physical memory, today's OS versions swap individual areas of the RAM that have not been used for some time out to the slower hard disk. This can slow down image capture if more image memory has been allocated than can be provided by the RAM at a time.

Parameter

none

The image memory is allocated automatically.

bActive/bSetAsActiveMem/bSetActive

true = Set image memory as active

false = Do not set image memory as active

size

Height: Image height

Width: Image width

s32Width

Image width

s32Height

Image height

s32BitsPerPixel

Image bit depth (bits per pixel).

s32MemId

Returns the image memory ID

allocated

Pointer to the starting address of the allocated memory