📄 formatddbdata.h
字号:
/////////////////////////////////////////////////////////////////////////////////
//
// FormatDdbData.h: interface for the CFormatDdbData class.
//
////////////////////////////////////////////////////////////////////////////////
// 版权所有(2000)
// Copyright(2000)
// 编写者: 向世明
// Author: Xiang Shiming
#ifndef _CFMTDDBDATA_H
#define _CFMTDDBDATA_H
class CFormatDdbData : public CObject
{
public:
CFormatDdbData();
virtual ~CFormatDdbData();
public:
int GetNearestColorIndex(BYTE byRed, BYTE byGreen, BYTE byBlue, PALETTEENTRY* pPalEntry);
BOOL CreateIdentityPalette(LOGPALETTE* pLogPalRsc, CPalette* pPalette);
void Format32To8(LPBYTE lpbySrcBits32, int nScanWidth, int nScanHeight, LPBYTE lpbyDstBits8, CPalette *pPalette);
void Format32To16(LPBYTE lpbySrcBits32, int nScanWidth, int nScanHeight, LPBYTE lpbyDstBits16);
void Format32To24(LPBYTE lpbypSrcBits32, int nScanWidth, int nScanHeight, LPBYTE lpbyDstBits24);
void Format24To8(LPBYTE lpbySrcBits24, int nScanWidth, int nScanHeight, LPBYTE lpbyDstBits8, CPalette *pPalette);
void Format24To32(LPBYTE lpbySrcBits24, int nScanWidth, int nScanHeight, LPBYTE lpbyDstBits32);
void Format24To16(LPBYTE lpbypSrcBits24, int nScanWidth, int nScanHeight, LPBYTE lpbyDstBits16);
protected:
void Remap(DWORD dwCount, LPBYTE pBits8, LOGPALETTE* pLogPalRsc, CPalette* pIdentityPal);
void QuantizeColor(LPBYTE pDdbBits24, int nScanWidth, int nScanHeight, LPBYTE pBits8, LOGPALETTE* pLogPalette);
WORD PutRGB16(BYTE byRed, BYTE byGreen, BYTE byBlue);
DWORD GetDdbWidthBytes(int nWidth, BYTE byBitCount);
};
#endif //
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -