【文件属性】:
文件名称:一个免费的C++ Bitmap 操作类
文件大小:43KB
文件格式:ZIP
更新时间:2011-09-27 16:42:38
免费 C++ MFC Bitmap 保存
这是一个用于C++ MFC开发的Bitmap图片操作类,在文件中叫CBitmapEx,可用于放大,缩小,翻转,过渡和其他有用的功能,有兴趣的朋友可以下载看看。
部分public method:
//
// void Create(long width, long height);
// void Create(CBitmapEx& bitmapEx);
// void Load(LPTSTR lpszBitmapFile);
// void Save(LPTSTR lpszBitmapFile);
// void Scale(long horizontalPercent=100, long verticalPercent=100);
// void Rotate(long degrees=0, _PIXEL bgColor=_RGB(0,0,0));
// void FlipHorizontal();
// void FlipVertical();
// void MirrorLeft();
// void MirrorRight();
// void MirrorTop();
// void MirrorBottom();
// void Clear(_PIXEL clearColor=_RGB(0,0,0));
// void Negative();
// void Grayscale();
// void Sepia(long depth=34);
// void Emboss();
// void Engrave();
// void Pixelize(long size=4);
// void Draw(HDC hDC);
// void Draw(long dstX, long dstY, long width, long height,
// CBitmapEx& bitmapEx, long srcX, long srcY);
// void Draw(long dstX, long dstY, long width, long height,
// CBitmapEx& bitmapEx, long srcX, long srcY, long alpha);
// void Draw(long dstX, long dstY, long dstWidth, long dstHeight,
// CBitmapEx& bitmapEx, long srcX, long srcY, long srcWidth, long srcHeight);
// void Draw(long dstX, long dstY, long dstWidth, long dstHeight, CBitmapEx& bitmapEx,
// long srcX, long srcY, long srcWidth, long srcHeight, long alpha);
// void DrawTransparent(long dstX, long dstY, long width, long height,
// CBitmapEx& bitmapEx, long srcX, long srcY, _PIXEL transparentColor=_RGB(0,0,0));
// void DrawTransparent(long dstX, long dstY, long width, long height,
// CBitmapEx& bitmapEx, long srcX, long srcY, long alpha,
// _PIXEL transparentColor=_RGB(0,0,0));
// void DrawTransparent(long dstX, long dstY, long dstWidth, long dstHeight,
// CBitmapEx& bitmapEx, long srcX, long srcY, long srcWidth, long srcHeight,
// _PIXEL transparentColor=_RGB(0,0,0));
// void DrawTransparent(long dstX, long dstY, long dstWidth, long dstHeight,
// CBitmapEx& bitmapEx, long srcX, long srcY, long srcWidth, long srcHeight,
// long alpha, _PIXEL transparentColor=_RGB(0,0,0));
// LPBITMAPFILEHEADER GetFileInfo() {return &m_bfh;}
// LPBITMAPINFOHEADER GetInfo() {return &m_bih;}
// long GetWidth() {return m_bih.biWidth;}
// long GetHeight() {return m_bih.biHeight;}
// long GetPitch() {return m_iPitch;}
// long GetBpp() {return m_iBpp;}
// long GetPaletteEntries() {return m_iPaletteEntries;}
// LPRGBQUAD GetPalette() {return m_lpPalette;}
// DWORD GetSize() {return m_dwSize;}
// LPBYTE GetData() {return m_lpData;}
// void SetResampleMode(RESAMPLE_MODE mode=RM_NEARESTNEIGHBOUR) {m_ResampleMode = mode;}
// RESAMPLE_MODE GetResampleMode() {return m_ResampleMode;}
// BOOL IsValid() {return (m_lpData != NULL);}
// _PIXEL GetPixel(long x, long y);
// void SetPixel(long x, long y, _PIXEL pixel);
//
【文件预览】:
CBitmapEx Project
----CBitmapEx Project.sln(916B)
----CBitmapEx Project.suo(16KB)
----CBitmapEx Project()
--------CBitmapEx Project.cpp(10KB)
--------CBitmapEx Project.rc(5KB)
--------resource.h(2KB)
--------stdafx.h(1KB)
--------CBitmapEx Project.aps(53KB)
--------CBitmapEx Project.vcproj.PMI.dnikoli1.user(1KB)
--------CBitmapEx Project.h(39B)
--------CBitmapEx Project.ico(23KB)
--------small.ico(23KB)
--------stdafx.cpp(304B)
--------BitmapEx.cpp(133KB)
--------ReadMe.txt(2KB)
--------CBitmapEx Project.vcproj(5KB)
--------BitmapEx.h(7KB)
网友评论
- 学习研究下
- 不错,但是都是英文标注,有点不方便
- 不错,可以编译运行,慢慢研究
- 不错,学习了,呵呵,好用
- 不错的资源,学习了。
- 不错,用着还可以
- 不错,可以编译运行,慢慢研究
- 用了一下,不错。 但有一个问题,如果bmp的位深为1。loadimge的时候界面上不显示