Command
QisLib_GetImage

QisLib_GetImage


Function:
	int QisLib_GetImage(CQisWindow* Window, int* ImageSize, const char** ImageBuffer);

Inputs:
	Window :Address of buffer to retrieve window extents corresponding to the image.
	ImageSize :Address of buffer to retrieve the size of the buffer pointed to by
	ImageBuffer in bytes.
	ImageBuffer :Address of pointer of type char*. When the function returns successfully,
	this pointer will point to the image data or may be invalid depending on certain
	conditions.

Return:
	success: 0
	failure: one of the following values :

Errors:
	1: 'DisplayHandle' parameter of QisLib_InitLib is NULL, operation not permitted.
	-1: QisLib has not been initialized.
	-2: Internal error occurred while generating the requested image.
	-3: Operation not effective, QisLib will draw directly to user program's drawing
	area.(Read 'Description')
	-4: File open in progress, operation not permitted.

Description:
	- This function retrieves an image from QisLib's internal drawing area. This is useful
	while QisLib is drawing, and before the drawing is finished, the user's program
	wants to get a partially drawn image. Showing this partially drawn image
	occasionally, e.g. every second, gives the end user a sense of progress.
	- On Unix/Linux, this function does nothing if the 'DisplayHandle' parameter was set
	to NULL in QisLib_InitLib.
	- If QisLib_SetDrawWindowID is on, this function returns an error code (-3).
	- The format of the image data (GIF, Bitmap or Xpm) depends on the
	QisLib_SetImageFormat setting (GIF by default).
	- If QisLib_SetImageFormat is off, QisLib_GetImage still returns valid GIF image data
	via the ImageBuffer pointer.
	- To specify the resolution of the image in pixels, call QisLib_SetImageSize.
	- QisLib_GetImage can be used to retrive partial images while QisLib_Redraw or
	QisLib_ZoomHome is in progress. To make use of this feature, QisLib_SetProcessEvents
	must be on so that QisLib can process asynchronous events during a busy redraw
	process. Additionally, on Unix/Linux, the program's application context must be
	passed to QisLib_InitLib.
	- The user can selective retrieve information from this function by setting Window,
	ImageSize or ImageBuffer to NULL based on what information is desired.
	- Since QisLib_GetImage only retrieves an image from QisLib's drawing area, this image
	may be old/stale. To get a fresh image, QisLib_Redraw must be used.

References:
CQisWindow
QisLib_SetImageFormat
QisLib_SetImageSize
QisLib_SetDrawWindowID
QisLib_Redraw
QisLib_SetProcessEvents
QisLib_InitLib