imaqFlatten

NI Vision for LabWindows/CVI Function

imaqFlatten

Usage

void* imaqFlatten(const Image* image, FlattenType type, CompressionType compression, int quality, unsigned int* size);

Purpose

Returns a data representation of an image. This representation can be converted back to an image with imaqUnflatten().

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_U16, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, IMAQ_IMAGE_COMPLEX, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL, IMAQ_IMAGE_RGB_U64

Parameters

Name

Type

Description

image const Image* The image to flatten.
type FlattenType What parts of the image to flatten.
compression CompressionType What type of compression to use on the pixel data of the image.
quality int If compression is being used, the quality of the compression, between 0-1000.
Note  The quality parameter is only used if the compression is IMAQ_COMPRESSION_JPEG.
size unsigned int* On return, the size of the data, in bytes. Set this parameter to NULL if you do not need this information.

Return Value

Type

Description

void* On success, this function returns a data representation of the image. On failure, this function returns NULL. To get extended error information, call imaqGetLastError(). When you are finished with the return value, dispose of the pointer by calling imaqDispose().