LAnimationWindow::GetAnimationColorOrder

#include "ltwrappr.h"

L_INT LAnimationWindow::GetAnimationColorOrder() const

Gets the color order for the playback bitmap.

Returns

The color order for the playback bitmap. Possible values are:

Value

Meaning

ORDER_RGB

[0] Red, green, and blue color order in memory

ORDER_BGR

[1] Blue, green, and red color order in memory

ORDER_GRAY

[2] 12 or 16-bit grayscale image. 12 and 16-bit grayscale images are only supported in the Document/Medical toolkits.

Required DLLs and Libraries

LTDIS
LTDLG
LTEFX
LTFIL
LTIMG
LTSCR
LTTWN

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

Platforms

Win32, x64.

See Also

Functions:

LAnimationWindow::LAnimationWindow, LAnimationWindow::GetAnimationBitsPerPixel, LAnimationWindow::Load, LAnimationWindow::PlayAnimation, Class Members

Topics:

Implementing Animation

Example

#define MAKE_IMAGE_PATH(pFileName) TEXT("C:\\Users\\Public\\Documents\\LEADTOOLS Images\\")pFileName 
L_INT LAnimationWindow_GetAnimationColorOrderExample(HWND hWndParent) 
{ 
   L_INT nRet; 
   LBase::LoadLibraries(LT_ALL_LEADLIB); 
   //make sure all libraries are loaded 
   LAnimationWindow MyAnimation; 
   MyAnimation.SetFileName(MAKE_IMAGE_PATH(TEXT("eye.gif"))); 
   nRet = MyAnimation.Load(); 
   if (nRet==SUCCESS) 
   { 
      L_TCHAR szStr[255]; 
      L_TCHAR  * pszColorOrder; 
      switch (MyAnimation.GetAnimationColorOrder()) 
      { 
         case ORDER_RGB : /* RGB ordering */ 
         pszColorOrder = TEXT("RGB ordered"); 
         break; 
         case ORDER_BGR : /* BGR ordering */ 
         pszColorOrder = TEXT("BGR ordered"); 
         break; 
         case ORDER_GRAY : /*Gray pixels */ 
         pszColorOrder = TEXT("Gray pixels"); 
         break; 
default : 
         pszColorOrder = TEXT("Unknown"); 
         break; 
      } 
      wsprintf(szStr, TEXT("Bitmap Bits Per Pixel = %d, Color order = %s."), 
      MyAnimation.GetAnimationBitsPerPixel(), pszColorOrder); 
      MessageBox(hWndParent, szStr,TEXT("Example"),MB_OK|MB_ICONSTOP); 
      return SUCCESS; 
   } 
   else 
      return nRet; 
} 

Help Version 19.0.2017.10.27
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.
LEADTOOLS Raster Imaging C++ Class Library Help