L_ClrIsValid

#include "ltkrn.h"
#include "ltclr.h"

L_INT EXT_FUNCTION L_ClrIsValid(ClrHandle)

HANDLE ClrHandle;

/* handle to the color conversion */

Determines whether the color conversion is valid to the conversion process.

Parameter

Description

ClrHandle

Handle to an existing color conversion. This handle is obtained by calling the L_ClrInit function.

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Comments

This function is useful for checking the validity of some conversion handle when using multiple converters.

Required DLLs and Libraries

LTCLR

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application

See Also

Functions:

L_ClrConvert

Topics:

Conversion Process

 

COLOR Function Groups

Example:

L_INT DoConvert(HANDLE ClrHandle, L_UCHAR *pInput, L_UCHAR *pOutput, L_INT nWidth, L_INT nHeight)
{
   L_INT error_code; /* return error code*/

   /* Check first the handle*/
   error_code = L_ClrIsValid(ClrHandle);

   if(error_code != SUCCESS)
      return error_code;

   /* Convert the image buffer */
   return L_ClrConvert(ClrHandle, /*conversion handle*/
      pInput, /*input buffer*/
      pOutput,/*output buffer*/
      nWidth, /*pixels width*/
      nHeight, /*pixels height*/
      0, /* 0 bytes align*/
      0); /*0 bytes align*/
}