LBitmapBase::GetColorCount

#include "ltwrappr.h"

virtual L_INT LBitmapBase::GetColorCount(puCount, uFlags=0)

Gets the number of unique colors in the class object's bitmap.

Parameters

L_UINT32 * puCount

Address of the variable to be updated with the number of unique colors.

L_UINT32 uFlags

Reserved for future use. Must be 0.

Returns

Value Meaning
SUCCESS The function was successful.
< 1 An error occurred. Refer to Return Codes.

Comments

This function supports signed data images.

This function supports 32-bit grayscale images.

Required DLLs and Libraries

Platforms

Win32, x64.

See Also

Functions

Topics

Example

L_INT LBitmapBase__GetColorCountExample() 
{ 
   L_INT nRet; 
   LBitmapBase MyBitmap; 
 
   L_UINT32 uCount; 
 
 
   MyBitmap.SetFileName(MAKE_IMAGE_PATH(TEXT("image1.cmp"))); 
   nRet =MyBitmap.Load(24); 
   if(nRet !=SUCCESS) 
      return nRet; 
 
   nRet =MyBitmap.GetColorCount(&uCount); 
   if(nRet !=SUCCESS) 
      return nRet; 
 
   return SUCCESS; 
} 
Help Version 21.0.2021.7.2
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Raster Imaging C++ Class Library Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.