8.6. tsImageGetInfo

Syntax

Pascal

procedure tsImageGetInfo(ImageID: tsImageID; pisEmpty: ptsBool;
  pWidth: ptsInt; pHeight: ptsInt; pFormat: ptsEnum; pData: PPointer);

C/C++

void tsImageGetInfo(tsImageID ImageID, tsBool * pisEmpty,
  tsInt * pWidth, tsInt * pHeight, tsEnum * pFormat, void ** pData);

Description

This function allowes you to query some informations from an image. If the Pointers aren't nil / NULL they will be filled with the information. Otherwise the parameters getting ignored.

Params

ImageID

The ImageID from which the infos will be quered.

pisEmpty

An pointer they indicates if the image is empty of if its containing any image data.

TS_TRUE

The image is empty.

TS_FALSE

The image isn't empty.

pWidth

An pointer in which the width will be returned.

pHeight

An pointer in which the height will be returned.

pFormat

An pointer in which the format will be returned. For an complete list of all supported formats look in the format table. If the image is empty the format will be TS_FORMAT_EMPTY.

pData

An pointer in which the datapointer of the image will be returned.

Error Codes

TS_NO_ACTIVE_CONTEXT

If there was no context bound.

TS_INVALID_VALUE

This will happen if you pass an invalid ImageID to this function.