资源简介
各种c语言处理图像的代码,中值滤波、直方图处理、旋转平移等等
代码片段和文件信息
// 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 属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
..A.SH. 10752 2009-08-09 18:20 C语言图像处理\256色转灰度图\测试图片\Thumbs.db
文件 66614 2004-06-30 00:47 C语言图像处理\256色转灰度图\测试图片\彩色lena图像.BMP
文件 66614 2004-06-30 00:47 C语言图像处理\256色转灰度图\测试图片\转换为灰度图像.BMP
文件 23782 2004-03-07 17:05 C语言图像处理\256色转灰度图\源代码\dibapi.cpp
文件 1876 2000-02-03 07:29 C语言图像处理\256色转灰度图\源代码\dibapi.h
文件 2506 2004-05-20 14:25 C语言图像处理\256色转灰度图\源代码\MainFrm.cpp
文件 1581 2004-05-20 14:25 C语言图像处理\256色转灰度图\源代码\MainFrm.h
文件 3157 2004-05-20 17:49 C语言图像处理\256色转灰度图\源代码\mydib.cpp
文件 72 2004-05-20 17:26 C语言图像处理\256色转灰度图\源代码\mydib.h
文件 46344 2004-06-30 00:45 C语言图像处理\256色转灰度图\源代码\MyDIP.aps
文件 2615 2004-06-30 00:43 C语言图像处理\256色转灰度图\源代码\MyDIP.clw
文件 4158 2004-05-20 14:25 C语言图像处理\256色转灰度图\源代码\MyDIP.cpp
文件 4785 2004-06-30 00:47 C语言图像处理\256色转灰度图\源代码\MyDIP.dsp
文件 533 2004-05-20 14:25 C语言图像处理\256色转灰度图\源代码\MyDIP.dsw
文件 1345 2004-05-20 14:25 C语言图像处理\256色转灰度图\源代码\MyDIP.h
文件 12279 2004-06-30 00:45 C语言图像处理\256色转灰度图\源代码\MyDIP.rc
文件 4007 2004-05-20 17:10 C语言图像处理\256色转灰度图\源代码\MyDIPDoc.cpp
文件 1830 2004-05-20 15:17 C语言图像处理\256色转灰度图\源代码\MyDIPDoc.h
文件 7042 2004-06-30 00:45 C语言图像处理\256色转灰度图\源代码\MyDIPView.cpp
文件 1852 2004-06-30 00:43 C语言图像处理\256色转灰度图\源代码\MyDIPView.h
文件 4287 2004-05-20 14:25 C语言图像处理\256色转灰度图\源代码\ReadMe.txt
文件 36864 2004-06-30 00:48 C语言图像处理\256色转灰度图\源代码\Release\MyDIP.exe
文件 1078 2004-05-20 14:25 C语言图像处理\256色转灰度图\源代码\res\MyDIP.ico
文件 397 2004-05-20 14:25 C语言图像处理\256色转灰度图\源代码\res\MyDIP.rc2
文件 1078 2004-05-20 14:25 C语言图像处理\256色转灰度图\源代码\res\MyDIPDoc.ico
文件 1078 2004-05-20 14:25 C语言图像处理\256色转灰度图\源代码\res\Toolbar.bmp
文件 874 2004-06-30 00:45 C语言图像处理\256色转灰度图\源代码\Resource.h
文件 207 2004-05-20 14:25 C语言图像处理\256色转灰度图\源代码\StdAfx.cpp
文件 1040 2004-05-20 17:21 C语言图像处理\256色转灰度图\源代码\StdAfx.h
文件 5332 2004-07-20 22:06 C语言图像处理\Hough变换\Hough变换.txt
............此处省略771个文件信息
- 上一篇:C++Builder 串口通信调试
- 下一篇:图像按任意角度旋转C++
相关资源
- 操作系统c语言模拟文件管理系统844
- C语言开发实战宝典
- C++中头文件与源文件的作用详解
- C语言代码高亮html输出工具
- 猜数字游戏 c语言代码
- C语言课程设计
- 数字电位器C语言程序
- CCS FFT c语言算法
- 使用C语言编写的病房管理系统
- 通信过程中的RS编译码程序(c语言)
- 计算机二级C语言上机填空,改错,编
- 用回溯法解决八皇后问题C语言实现
- 简易教务管理系统c语言开发文档
- 操作系统课设 读写者问题 c语言实现
- 小波变换算法 c语言版
- C流程图生成器,用C语言代码 生成C语
- 3des加密算法C语言实现
- 简单的C语言点对点聊天程序
- 单片机c语言源程序(51定时器 八个按
- 个人日常财务管理系统(C语言)
- c语言电子商务系统
- 小甲鱼C语言课件 源代码
- 将图片转换为C语言数组的程序
- C语言实现的一个内存泄漏检测程序
- DES加密算法C语言实现
- LINUX下命令行界面的C语言细胞游戏
- 用单片机控制蜂鸣器播放旋律程序(
- 学校超市选址问题(数据结构C语言版
- 电子时钟 有C语言程序,PROTEUS仿真图
- 尚观培训linux许巍老师关于c语言的课
川公网安备 51152502000135号
评论
共有 条评论