L_ClrIsValid

Summary

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

Syntax

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

L_LTCLR_API L_INT L_ClrIsValid(ClrHandle)

Parameters

L_HANDLE ClrHandle

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

Returns

Value Meaning
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.

Platforms

Win32, x64.

Required DLLs and Libraries

See Also

Functions

Topics

Example

L_INT ClrIsValidExample( 
   HANDLE ClrHandle, 
   L_UCHAR* pInput, 
   L_UCHAR* pOutput, 
   L_INT nWidth, 
   L_INT nHeight) 
{ 
   L_INT nRet; 
 
   /* Check first the handle*/ 
   nRet = L_ClrIsValid(ClrHandle); 
   if(nRet != SUCCESS) 
      return nRet; 
 
   /* Convert the image buffer */ 
   nRet = 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     */ 
 
   return nRet; 
} 
Help Version 23.0.2024.10.29
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2024 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Color Conversion C API Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.