资源简介
图像亮度调整源代码,希望都大家有用

代码片段和文件信息
// 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
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
....... 96 2004-08-04 13:44 亮度增减\readme.txt
....... 2506 2004-05-20 14:25 亮度增减\源代码\MainFrm.cpp
....... 1581 2004-05-20 14:25 亮度增减\源代码\MainFrm.h
....... 46340 2004-06-29 23:11 亮度增减\源代码\MyDIP.aps
....... 2643 2004-06-29 23:11 亮度增减\源代码\MyDIP.clw
....... 4158 2004-05-20 14:25 亮度增减\源代码\MyDIP.cpp
....... 4781 2004-05-20 17:54 亮度增减\源代码\MyDIP.dsp
....... 533 2004-05-20 14:25 亮度增减\源代码\MyDIP.dsw
....... 1345 2004-05-20 14:25 亮度增减\源代码\MyDIP.h
....... 12391 2004-06-29 23:11 亮度增减\源代码\MyDIP.rc
....... 4007 2004-05-20 17:10 亮度增减\源代码\MyDIPDoc.cpp
....... 1830 2004-05-20 15:17 亮度增减\源代码\MyDIPDoc.h
....... 6605 2004-06-29 23:11 亮度增减\源代码\MyDIPView.cpp
....... 1886 2004-06-29 23:11 亮度增减\源代码\MyDIPView.h
....... 4287 2004-05-20 14:25 亮度增减\源代码\ReadMe.txt
....... 921 2004-06-29 23:11 亮度增减\源代码\Resource.h
....... 207 2004-05-20 14:25 亮度增减\源代码\StdAfx.cpp
....... 1040 2004-05-20 17:21 亮度增减\源代码\StdAfx.h
....... 23782 2004-03-07 17:05 亮度增减\源代码\dibapi.cpp
....... 1876 2000-02-03 07:29 亮度增减\源代码\dibapi.h
....... 3157 2004-05-20 17:49 亮度增减\源代码\mydib.cpp
....... 72 2004-05-20 17:26 亮度增减\源代码\mydib.h
....... 1078 2004-05-20 14:25 亮度增减\源代码\res\MyDIP.ico
....... 397 2004-05-20 14:25 亮度增减\源代码\res\MyDIP.rc2
....... 1078 2004-05-20 14:25 亮度增减\源代码\res\MyDIPDoc.ico
....... 1078 2004-05-20 14:25 亮度增减\源代码\res\Toolbar.bmp
目录 0 2005-12-03 18:38 亮度增减\源代码\res
....... 36864 2004-06-29 23:11 亮度增减\源代码\Release\MyDIP.exe
目录 0 2005-12-03 18:38 亮度增减\源代码\Release
目录 0 2005-12-03 18:38 亮度增减\源代码
............此处省略9个文件信息
- 上一篇:高斯平滑源代码
- 下一篇:onvif的经典,有客户端和服务器
相关资源
- bp神经网络源代码,可直接运行
- 遥感图像几何校正模型探讨
- 仿知乎界面小程序源代码
- 贪吃蛇源代码.fla
- 图像的小波包分解
- dotnet 写字板 实验 源代码 不好请要不
- 图像二维小波变换的实现源代码
- 八三编码器设计 VHDL代码 简单,包附
- linux应用层的华容道游戏源代码
- VC 获得文件属性 获取文件的创建时
- 网上拍卖系统完整源代码
- CSMA/CD等动画演示加源代码
- silicon lab公司的收音IC SI47XX全套开发工
- 读者写者问题(读者优先,写者优先
- 图像二值化
- 合同管理系统的源代码(附数据库)
- 用VC 编写的仿QQ聊天室程序源代码
- [免费]图像识别c 源码
- STM32F103 串口程序(完整版)
- VPC3_DPV1源代码,Profibus
- PB做的托盘程序(最小化后在左下角显
- 三维重建(旋转)由已知对应图像点
- jcrop v0.9.12
- 透明加密源码及说明
- 排队机叫号 源代码
- 五子棋C 源代码
- CAD LISP24个源代码
- 二叉树基本操作源代码
- 推箱子及人工智能寻路C 源代码
- opengl轮廓字体源代码
评论
共有 条评论