Hot Search : Source embeded web remote control p2p game More...
Location : Home Search - gdi
Search - gdi - List


需要注意的地方:

使用VC++6.0做开发工具, 采用简单的SDI框架结构 ,一次处理一幅位图(有兴趣的可以作成MDI)

1)位图信息的数据是从左下往右下为一行,一行一行往上排的。

2)每行像素应该是4的倍数,不足的地方用空点补齐,读的时候注意跳过冗余点。

3)主要数据都存在Doc里面,BMP的主要数据存在一个由ImgData指向的BYTE型的内存空间(根据位图的大小,动态分配的)。

4)数据读进来以后,注意向内存中贴图,以保证刷新的效率。

5)程序执行流程

应用程序生成--》打开--》CDipView的OnFileOpen 函数--》

调用CDipDoc的FileOpen 函数--》并使用myDoc->UpdateAllViews(NULL); 刷新

自动调用CDipView的OnPaint函数--》调用CDipView的OnDraw函数----一个像素点一个像素点的画

//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

比较重要的地方

读BMP文件,只能打开256色   (可以是灰度)

显示和内存贴图技术

关于调色板: 调色板实际上是一个数组,4个BYTE 分别是 B,G,R,和 Reserved
每一个像素点都有一个相应的数组。


关于VC和windows 的绘图机制:
使用GDI(图形设备接口)对象,通常使用CDC 类,CPaintDC也一样(device-context)设备上下文

windows下的MFC编程机制,消息驱动,事件等待!

全局的app(应用程序对象)

注意 手工分配内存的清除 和CDC对象的删除 以释放系统的GDI资源
每一个new操作符都要对应一个delete

虽然已经弄出来了,还是希望大家好好读读源程序。

你们以后的工作:

在菜单中添加菜单项,通过ClassWizzard 生成消息响应函数(当然也可手动添加),
所有的操作应当是对 BYTE* ImgData;进行的。
在完成相应的功能后 将 isnewfile 和 isnewiamge 置为真 ,并使用myDoc->UpdateAllViews(NULL); 刷新

当然,可以更加有个性化一点,有能力的同学可以自己完成。
随着课程的进行,菜单功能逐渐丰富,最后完成基本的数字图像处理的功能,而不必最后一下完成一个大的作业。

 

 


Date : 2008-06-18 Size : 288.14kb User : tata80808

仿照QQ的屏幕截图工具vc源码,对于学习GDI是非常好的参考
Date : 2008-10-13 Size : 92.46kb User : 徐名

此源代码将演示如何用C,Win 32 SDK及GDI+来实现边缘检测。(C++,C)-this source code to demonstrate how to use C, Win 32 SDK GDI and edge detection to achieve. (C, C)
Date : 2008-10-13 Size : 83kb User : 冯枫

此源代码将演示如何用C,Win 32 SDK及GDI+来实现边缘检测。(C++,C)-this source code to demonstrate how to use C, Win 32 SDK GDI and edge detection to achieve. (C, C)
Date : 2025-12-30 Size : 83kb User : 冯枫

仿照QQ的屏幕截图工具vc源码,对于学习GDI是非常好的参考-QQ modeled screenshot tool vc source for learning GDI is a very good reference
Date : 2025-12-30 Size : 92kb User : 徐名

形码生成与识别的研究及实现(要求用C#或VB.NET实现 )1.条形码生成:通过对条形码结构、编码规则的学习和对C#中图像的读取及图像的基本操作的掌握,学会用GDI生成Code39条形码,或者用特殊字体的方式生成条形码,最终将输入的文字信息转化成符合国际标准的条形码。 2、条形码识别:确定系统框架,用C#完成课题的详细设计和代码编写,根据条形码的码制规则,对以图片方式获得的条形码通过图像处理相关知识经滤波、边缘检测、区域分割等处理进行识别,将条形码信息解析成相应文字-Code generation and recognition of research and the realization (requires C# Or VB.NET to achieve) 1. Bar code generation: structure of bar codes, coding rules for learning and C# Read in the image and the image of the basic operation of the master , learn how to use GDI to generate Code39 barcodes or special way to generate bar code fonts, the text will eventually enter the information into the bar code in line with international standards. 2, bar code recognition: the system framework, the C# Completed the detailed design and coding, the code system in accordance with the rules of the bar code on the way to the bar code image through image processing-related knowledge by filtering, edge detection, region segmentation, such as dealing with identification, bar code information into the appropriate text analysis
Date : 2025-12-30 Size : 12kb User : wangchuanmeng

1.条形码生成:通过对条形码结构、编码规则的学习和对C#中图像的读取及图像的基本操作的掌握,学会用GDI生成Code39条形码,或者用特殊字体的方式生成条形码,最终将输入的文字信息转化成符合国际标准的条形码。 2、条形码识别:确定系统框架,用C#完成课题的详细设计和代码编写,根据条形码的码制规则,对以图片方式获得的条形码通过图像处理相关知识经滤波、边缘检测、区域分割等处理进行识别,将条形码信息解析成相应文-1. Bar code generation: structure of bar codes, coding rules for learning and C# Read in the image and the image of the basic operation of the master, learn how to use GDI to generate Code39 barcodes or special way to generate bar code font, will eventually enter text information into the bar code in line with international standards. 2, bar code recognition: the system framework, the C# Completed the detailed design and coding, the code system in accordance with the rules of the bar code on the way to the bar code image through image processing-related knowledge by filtering, edge detection, region segmentation, such as dealing with identification, bar code information into the appropriate text analysis
Date : 2025-12-30 Size : 2.91mb User : wangchuanmeng

1.条形码生成:通过对条形码结构、编码规则的学习和对C#中图像的读取及图像的基本操作的掌握,学会用GDI生成Code39条形码,或者用特殊字体的方式生成条形码,最终将输入的文字信息转化成符合国际标准的条形码。 2、条形码识别:确定系统框架,用C#完成课题的详细设计和代码编写,根据条形码的码制规则,对以图片方式获得的条形码通过图像处理相关知识经滤波、边缘检测、区域分割等处理进行识别,将条形码信息解析成相应文-1. Bar code generation: structure of bar codes, coding rules for learning and C# Read in the image and the image of the basic operation of the master, learn how to use GDI to generate Code39 barcodes or special way to generate bar code font, will eventually enter text information into the bar code in line with international standards. 2, bar code recognition: the system framework, the C# Completed the detailed design and coding, the code system in accordance with the rules of the bar code on the way to the bar code image through image processing-related knowledge by filtering, edge detection, region segmentation, such as dealing with identification, bar code information into the appropriate text analysis
Date : 2025-12-30 Size : 11kb User : wangchuanmeng

基于GDI+开发的透明按钮!可以加载PNG图片,唯一的缺点在于无法半透明!-MFC png buttons, personality guarantees fully available, usage, see the source code, we know that so I do not take test engineering
Date : 2025-12-30 Size : 17.66mb User : yanglinjun

delphi验证码识别学习之图像的灰度化、二值化及反色 ,本文的方法同时适用于GDI+图像和Delphi的TGraphic图像。 -delphi image verification code recognition learning of graying, binarization and anti-color, method of this article apply to both GDI+ image and TGraphic image of Delphi.
Date : 2025-12-30 Size : 221kb User : 风清扬
CodeBus is one of the largest source code repositories on the Internet!
Contact us :
1999-2046 CodeBus All Rights Reserved.