?? geometrytrans.h
字號:
#ifndef _INSIDE_VISUAL_CPP_GeometryTrans
#define _INSIDE_VISUAL_CPP_GeometryTrans
#include "ImageCenterDib.h"
//幾何變換類
class GeometryTrans:public ImgCenterDib
{
public:
//輸出圖像每像素位數(shù)
int m_nBitCountOut;
//輸出圖像位圖數(shù)據(jù)指針
unsigned char * m_pImgDataOut;
//輸出圖像顏色表
LPRGBQUAD m_lpColorTableOut;
private:
//輸出圖像的寬
int m_imgWidthOut;
//輸出圖像的高
int m_imgHeightOut;
//輸出圖像顏色表長度
int m_nColorTableLengthOut;
public:
//構(gòu)造函數(shù)
GeometryTrans();
//帶參數(shù)的構(gòu)造函數(shù)
GeometryTrans(CSize size, int nBitCount, LPRGBQUAD lpColorTable, unsigned char *pImgData);
//析構(gòu)函數(shù)
~GeometryTrans();
//以像素為單位返回輸出圖像的寬和高
CSize GetDimensions();
//平移
void Move(int offsetX, int offsetY);
//水平鏡像
void MirrorHori();
//垂直鏡像
void MirrorVerti();
//轉(zhuǎn)置
void ZhuanZhi();
//順時針旋轉(zhuǎn)90度
void Clockwise90();
//逆時針旋轉(zhuǎn)90度
void Anticlockwise90();
//旋轉(zhuǎn)180
void Rotate180();
//旋轉(zhuǎn)
void Rotate(int angle, int interpolationflag);//angle旋轉(zhuǎn)角度
//縮放
void Zoom(int zoomWidthPixel, int zoomHeightPixel, int interpolationflag);//縮放
private:
//雙線性插值
unsigned char interpolationDblLinear(unsigned char array[2][2], float xpos, float ypos);
//立方卷積插值
unsigned char interpolationCube(unsigned char array[4][4], float xpos, float ypos);
//近鄰插值縮放
void ZoomNeighbor(unsigned char *pImgIn, int widthIn, int heightIn, int biBitCount,
unsigned char *pImgOut, int widthOut, int heightOut);
//雙線性插值縮放
void ZoomDblLinear(unsigned char *pImgIn, int widthIn, int heightIn, int biBitCount,
unsigned char *pImgOut, int widthOut, int heightOut);
//立方卷積插值縮放
void ZoomCube(unsigned char *pImgIn, int widthIn, int heightIn, int biBitCount,
unsigned char *pImgOut, int widthOut, int heightOut);
//近鄰插值旋轉(zhuǎn)
void RotateNeighbor(int angle);
//雙線性插值旋轉(zhuǎn)
void RotateDblLinear(int angle);
//立方卷積插值旋轉(zhuǎn)
void RotateCube(int angle);
};
#endif // _INSIDE_VISUAL_CPP_GeometryTrans
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -