资源简介
这MFC图像处理源代码总集包括了均值滤波,直方图均衡,高斯平滑,,锐化,拉普拉斯锐化(边缘检测),阈值变换,用Canny算子提取边缘,图像平移,旋转,缩放等,而且均能运行。

代码片段和文件信息
// dibapi.cpp
//
// Source file for Device-Independent Bitmap (DIB) API. Provides
// the following functions:
//
// PaintDIB() - Painting routine for a DIB
// CreateDIBPalette() - Creates a palette from a DIB
// FindDIBBits() - Returns a pointer to the DIB bits
// DIBWidth() - Gets the width of the DIB
// DIBHeight() - Gets the height of the DIB
// PaletteSize() - Gets the size required to store the DIB‘s palette
// DIBNumColors() - Calculates the number of colors
// in the DIB‘s color table
// CopyHandle() - Makes a copy of the given global memory block
//
// This is a part of the Microsoft Foundation Classes C++ library.
// Copyright (C) 1992-1997 Microsoft Corporation
// All rights reserved.
//
// This source code is only intended as a supplement to the
// Microsoft Foundation Classes Reference and related
// electronic documentation provided with the library.
// See these sources for detailed information regarding the
// Microsoft Foundation Classes product.
#include “stdafx.h“
#include “dibapi.h“
#include
#include
#include
#define DIB_HEADER_MARKER ((WORD) (‘M‘ << 8) | ‘B‘)
#ifdef _MAC
#define SWAPWORD(x) MAKEWORD(HIBYTE(x) LOBYTE(x))
#define SWAPLONG(x) MAKELONG(SWAPWORD(HIWORD(x)) SWAPWORD(LOWORD(x)))
void ByteSwapHeader(BITMAPFILEHEADER* bmiHeader);
void ByteSwapInfo(LPSTR lpHeader BOOL fWin30Header);
#endif
/*************************************************************************
*
* PaintDIB()
*
* Parameters:
*
* HDC hDC - DC to do output to
*
* LPRECT lpDCRect - rectangle on DC to do output to
*
* HDIB hDIB - handle to global memory with a DIB spec
* in it followed by the DIB bits
*
* LPRECT lpDIBRect - rectangle of DIB to output into lpDCRect
*
* CPalette* pPal - pointer to CPalette containing DIB‘s palette
*
* Return Value:
*
* BOOL - TRUE if DIB was drawn FALSE otherwise
*
* Description:
* Painting routine for a DIB. Calls StretchDIBits() or
* SetDIBitsToDevice() to paint the DIB. The DIB is
* output to the specified DC at the coordinates given
* in lpDCRect. The area of the DIB to be output is
* given by lpDIBRect.
*
************************************************************************/
BOOL WINAPI PaintDIB(HDC hDC
LPRECT lpDCRect
HDIB hDIB
LPRECT lpDIBRect
CPalette* pPal)
{
LPSTR lpDIBHdr; // Pointer to BITMAPINFOHEADER
LPSTR lpDIBBits; // Pointer to DIB bits
BOOL bSuccess=FALSE; // Success/fail flag
HPALETTE hPal=NULL; // Our DIB‘s palette
HPALETTE hOldPal=NULL; // Previous palette
/* Check for valid DIB handle */
if (hDIB == NULL)
return FALSE;
/* Lock down the DIB and get a pointer to the beginning of the bit
* buffer
*/
l
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 66614 2004-06-30 00:47 图象处理-1\256色转灰度图\彩色lena图像.BMP
..A.SH. 10752 2006-10-07 18:22 图象处理-1\256色转灰度图\测试图片\Thumbs.db
文件 66614 2004-06-30 00:47 图象处理-1\256色转灰度图\测试图片\彩色lena图像.BMP
文件 66614 2004-06-30 00:47 图象处理-1\256色转灰度图\测试图片\转换为灰度图像.BMP
文件 23782 2006-12-21 11:02 图象处理-1\256色转灰度图\源代码\dibapi.cpp
文件 1876 2000-02-03 07:29 图象处理-1\256色转灰度图\源代码\dibapi.h
文件 2506 2006-12-20 16:06 图象处理-1\256色转灰度图\源代码\MainFrm.cpp
文件 1581 2006-12-20 15:26 图象处理-1\256色转灰度图\源代码\MainFrm.h
文件 3157 2004-05-20 17:49 图象处理-1\256色转灰度图\源代码\mydib.cpp
文件 72 2004-05-20 17:26 图象处理-1\256色转灰度图\源代码\mydib.h
文件 30692 2006-12-20 15:24 图象处理-1\256色转灰度图\源代码\MyDIP.aps
文件 2615 2006-12-23 23:12 图象处理-1\256色转灰度图\源代码\MyDIP.clw
文件 4158 2004-05-20 14:25 图象处理-1\256色转灰度图\源代码\MyDIP.cpp
文件 4785 2004-06-30 00:47 图象处理-1\256色转灰度图\源代码\MyDIP.dsp
文件 533 2004-05-20 14:25 图象处理-1\256色转灰度图\源代码\MyDIP.dsw
文件 1345 2004-05-20 14:25 图象处理-1\256色转灰度图\源代码\MyDIP.h
文件 12279 2004-06-30 00:45 图象处理-1\256色转灰度图\源代码\MyDIP.rc
文件 4007 2004-05-20 17:10 图象处理-1\256色转灰度图\源代码\MyDIPDoc.cpp
文件 1830 2004-05-20 15:17 图象处理-1\256色转灰度图\源代码\MyDIPDoc.h
文件 7042 2004-06-30 00:45 图象处理-1\256色转灰度图\源代码\MyDIPView.cpp
文件 1852 2004-06-30 00:43 图象处理-1\256色转灰度图\源代码\MyDIPView.h
文件 4287 2004-05-20 14:25 图象处理-1\256色转灰度图\源代码\ReadMe.txt
文件 36864 2004-06-30 00:48 图象处理-1\256色转灰度图\源代码\Release\MyDIP.exe
文件 1078 2004-05-20 14:25 图象处理-1\256色转灰度图\源代码\res\MyDIP.ico
文件 397 2004-05-20 14:25 图象处理-1\256色转灰度图\源代码\res\MyDIP.rc2
文件 1078 2004-05-20 14:25 图象处理-1\256色转灰度图\源代码\res\MyDIPDoc.ico
..A.SH. 6656 2006-12-20 15:18 图象处理-1\256色转灰度图\源代码\res\Thumbs.db
文件 1078 2004-05-20 14:25 图象处理-1\256色转灰度图\源代码\res\Toolbar.bmp
文件 874 2004-06-30 00:45 图象处理-1\256色转灰度图\源代码\Resource.h
文件 207 2004-05-20 14:25 图象处理-1\256色转灰度图\源代码\StdAfx.cpp
............此处省略1256个文件信息
- 上一篇:四种页面置换算法代码
- 下一篇:VisualC++网络通信编程技术详解
相关资源
- 《Linux程序设计》第四版pdf高清电子版
- C++ Primer mobi
- 使用 IBM Rational Systems Developer 和 Rati
- VC编程助手2010破解版(原名VA_X_10.6.
- Linux操作系统下C语言编程从零开始
- 一个C++实现的源代码行数统计工具
- easySize使用方法和代码
- TLV解析算法
- C++ 从入门到精通明日科技光盘 百度云
- C和C++.rar
- consts.cpp
- 银行管理系统.cpp
- VC++外挂框架.rar
- VisualC++网络高级编程.(人民邮电.陈坚
- C++黑客编程揭秘与防范.pdf
- BombGoldFlower.cpp
- c++万能外挂.txt
- ZhajingHua.cpp
- C++AMP.pdf
- c++程序设计语言英文第三版.pdf
- Visual_assist_X_for_VC6.0破解版.rar
- 《C语言程序设计》谭浩强.pdf
- c++辅助源码.rar
- GBT28169-2011嵌入式软件C语言编码规范
- C语言程序设计(郑莉)源码.rar
- zw_MFC编写一个简单的登录对话框(连
- 鸡啄米:VS2010MFC编程入门教程.pdf
- ATM源代码用c++文件读写.zip
- C语言写的文件传输系统
- MFC黑马程序员教程.rar
评论
共有 条评论