vc环境下数学图像的几种特效处理毕业设计 rar压缩包密码破解

您所在位置: &
&nbsp&&nbsp&nbsp&&nbsp
基于VC++的图像特效显示研究_毕业设计.doc49页
本文档一共被下载:
次 ,您可免费全文在线阅读后下载本文档
文档加载中...广告还剩秒
需要金币:200 &&
你可能关注的文档:
··········
··········
基于VC++的图像特效显示研究
专业名称:电子信息科学与技术
图像的特效显示在计算机技术领域应用广泛,Windows的屏幕保护程序就采用了各种各样的图像特效显示,使人感到耳目一新。本论文阐述了基于VC++设计图像特效显示的基本原理和方法,研究了现有的扫描特效显示、栅条特效显示、马赛克特效显示,并分析了这些显示的相关算法,通过研究创新设计出两个特效显示――渐变百叶窗特效和泡泡腐蚀特效,介绍了这两个特效显示的算法实现及软件界面的设计实现过程。
Special effects show for images is applied in the field of computer technology widely. The Windows screen savers use a variety of image special effects which feel refresh. This paper describes the basic principles and methods of image special effects show based on VC++. The algorithm of the effect shows including scanning special effect show, bar special effect show and mosaic special effect show are studied. This paper also designes two special effects――Gradually changing blinds and corroding bubble. The implementation of the display algorithm and software interface designment are realized in this paper.
ThedigitalimageprocessinginterfaceisbasedonMicrosoftVisualC???6.0MFCmulti-documentimageprocessingprogramminginterface,toachieve.Bmpformatforimagebrowsingandediting,importandexport,imageeffectsshowedthatedgedetection,rod methods of image special effects shotateandflipimages,picturesenhancetheoptimization,aswellasprintoutputpicture.Isafunctionofthedigitalimagethanthesimplemanagementinterface,toachieve.Bmpformatimagesoftheoperation.Theinterfacecontainstwoparts:interfaceandthemaininterfacetostart.
BMPfileisaWindowsoperatingsystemandsupporttherecommendedimagefileformat,isamemoryordisplaythecompressedimagedataisnotdirectlybasedondigitalarchivingoffileformats,BMPfilesaregenerally
正在加载中,请稍后...10836人阅读
几种图像处理库的研究
LEADTOOLSImageStoneGIMP、CxImage等,虽然它们的功能没有LEADTOOLS强大,但是一般的图像处理是可以应付的。
LEAD Technologies 是一个拥有九年多开发数字图形技术历史的公司,他专为程序开发者提供软件开发工具包。他已经为微软等公司提供了很多图形图象技术。这个软件包是该公司开发的开发工具的集合,包括占线帮助,Lead API、C++ 类库、ActiveX 控件、VCLs 和一些实例原代码等。这个软件包是开发工具的集合包括占线帮助,Lead API、C++ 类库、ActiveX 控件、VCLs 和一些实例原代码等。
(1) 对显示设备的全面支持:在显示时,你的程序中无需考虑是哪种显示模式,如16色还是真彩色。LeadTools为你做了所有的事。当然你也可以通过设置参数获得对显示设备更多的控制。你还可以实现自己的调色板。
(2) 支持多种文件格式:表10.1是LeadTools所支持的常用文件格式,其中读表示用LeadTools能打开的文件格式,写表示LeatTools能存成的文件格式:
(3) 图象处理:如二值化、平滑、加噪声、增加对比度、色调、饱和度、亮度、Gamma校正、中值滤波、半影调、抖动、橡皮筋、滚动、填充、反色、镜象、马赛克、浮雕、打印、扫描、拷贝、粘贴、裁剪、缩放、截屏、调色板、直方图、有关数据库的操作、还有制作幻灯的功能,如淡入、淡出、卷帘等等、真的很爽。表10.2是Version5.1的所有属性、事件、和方法列表,看看有没有你所需要的功能。以字母顺序排列,其中标[P]的表示只有专业级(Professional)和特殊级(Express)用户才能使用。
(4) 新增功能:
Vector的新功能
Annotations的新对象和新功能
OCR Module 更新
新增模块:ICR Module
新增模块:OMR Module (Forms 处理)
新增的公共图象对话框
100余种图象处理功能
DjVu& ,KDC和其他的新格式支持
Medical Imaging 更新
Multimedia 更新
C++ Class Lib 更新
COM Object 更新,包含新的.NET 示例
相关包的破解地址:
相关开发包介绍:
LEADTOOLS Medical Imaging SDK
LEADTOOLS Medical Imaging包含了一些精心挑选的、经过优化的特性,可以满足医疗成像应用程序开发的特殊需要,比如,完全的DICOM数据集支持,可以支持8-16位灰度级,以及12和16位的图像处理,窗位(Window Leveling)显示,还包含LUT处理。
MRI大脑分析工具:可以用于计算胼胝体(大脑中部的白色物质,就像字母X)和脑球体之间的比率。
LEADTOOLS Multimedia
您可以使用LEADTOOLS Multimedia SDK创建具有专业水准的高品质的多媒体应用程序。该控件中加入了诸如捕获、播放和编辑等多媒体功能以及对最新的DirectShow过滤和许多多媒体文件格式的支持,即可以加载和转换多种文件格式(包括WAV、AVI、ASF、WMA、WMV、MPEG-1、OGG等等)。可以编程控制多媒体处理、压缩,视频和音频输入;还增加了摄像控制(亮度、对比度、缩放等等);以及更灵活的捕获选项等等更多功能。
多媒体捕获
多媒体播放
多媒体转换
多媒体文件格式
多媒体压缩
多媒体处理
DirectShow过滤器
LEADTOOLS Raster Imaging SDK
LEADTOOLS Document Imaging 是一套可以扫描多种语言文档的COM和VCL控件。它可以执行光学字符识别,并且将扫描出的文本以四十多种不同的格式输出,包括MS Word,MS Excel,Dbase和WordPerfect等等。当它用于格式识别和处理应用时,可以加快光符识别处理速度。
注释本产品具有强大的注释功能,可以添加文本、高亮、附注、音频、椭圆、圆、方形、按钮、线条、箭头、长方形、多边形、修订(中断信息)、热点、手写字、指针、图像、图章、标尺和超级链接,以上所有对于文档、色彩和灰度图像都具有多层安全特性。文档成像(Document Imaging)和文档成像套装(Document Imaging Suite)产品都具有此注释功能。
显示,处理以及内存优化本产品不仅包含了光栅成像产品的所有显示功能,还拥有被称为双色缩放比例的专业化显示选项,此功能能够大大的提高成像图像的质量以及屏幕上黑白图像的可读性。
图像获取 & TWAIN捕获TWAIN驱动是几乎所有扫描器和其它图像获取设备的标准,再加上技术的进一步完善,因此我们的LEADTOOLS Fast TWAIN产品绝对是您在性能和可靠性方面的最佳选择。目前LEADTOOLS 文档成像(LEADTOOLS Document Imaging)产品支持TWAIN 1.9规范中的所有功能。
图像增强功能扫描和传真过程中,噪声和失真不可避免,而它们会导致光符字符识别的精度下降并影响人类阅读。要克服这些缺点,用户只需使用LEADTOOLS文档成像产品中名为Doc-Clean的功能,此功能可以消除成像图像中的噪声、边界、线条和装订孔,平滑文本,反转白色文本为黑色文本,还包含可延伸的倾斜图像(抗扭斜),粗化线条和文本(膨胀)以及腐蚀过厚的文本的其它功能(腐蚀)。
专用存储和压缩功能Mixed Raster Content(MRC)使用一种技术将图像划分为图像和文本,然后使用一种适合于此类型图像的压缩技术来获取最高的压缩率以及最佳的图像质量。
光学字符识别(OCR)光学字符识别功能能够将图像转换成编码形式的字符串,或将其内容以各种文档、数据库以及表单的格式保存(更多有关内容,请参考LEADTOOLS OCR功能)。文档成像套装(Document Imaging Suite)产品包含有此功能,如果您使用的是文档成像(Document Imaging)产品,则可以购买一个OCR插件来获取此功能。
条形码条形码应用于文档成像领域已有多年的历史,它主要用来帮助识别文档,能够包含文档信息以及用于其它用途的各种信息。鉴于条形码在文档成像应用程序中的强大功能,LEAD公司推出了多种强大的条形码扩展功能,您可以购买这些功能来满足您的应用程序的特定需求。
全面成像特征功能为使LEADTOOLS图像成像系列产品成为用途最广泛和最强大的图像成像产品,LEAD公司开发了全面的(双色、灰度以及彩色)成像特征功能包括图像处理(变换、过滤、绘制),颜色转换、显示、特效(精选自两千多种特效),压缩、(导入/导出的)图像格式,打印、国际互联网/企业内部互联网成像、数据库成像、成像通用对话框以及屏幕抓拍等等。
ImageStone
ImageStone是一套功能强大的C++图像处理库,它可以在多个平台之间移植。 & & 功能包括:读写图像文件(JPG,GIF,PNG,TIFF,TGA...),显示,柱状图分析,undo/redo支持,超过100种预定义的特效等。 & &下载地址:/cpp/g-m/bitmap/viewers/article.php/c12577/& && 里面有全部的源码和详细的帮助文档加9个例子程序,其中example &008是一个比较完善的图像处理程序。 &Introduction
ImageStone is a powerful C++ class library for image manipulation. It is written in pure C++ and is easy to port. Its features include load/save (supports BMP, GIF, JPG, PNG, TIF, ICO, TGA, PCX, PSD...), display, histogram, undo/redo, and image transformation with over 100 predefined effects.
ImageStone is free. You can use the code however you want (free or commercial), as long as you don't claim it as your own. (If you use it in your product, I hope I could be notified.)
Using ImageStone
It's extremely easy. All you need to do is add #include "ImageStone.h" at the beginning of your source code. If you are using ImageStone in a MFC project, just add this include line at the end of the StdAfx.h file.
The most basic and most important class is FCObjImage. Learn how to use it.
... load/save image file under any OS
Jpg/Png/Gif/Bmp/Tga/Tif be supported
FreeImage handler to support more.
FCObjImage&&
img.Load ("test.jpg") ;
if (!img.IsValidImage())
&& assert(false) ;
&& return false ;
printf ("image's width : %d",& img.Width()) ;
printf ("image's height : %d", img.Height()) ;
printf ("image's bpp : %d",&&& img.ColorBits()) ;
img.Save ("save.jpg", 90) ;
img.Save ("save.png") ;
img.Save ("save.tif") ;
FCImageProperty&&
prop.SetPropertyValue (IMAGE_TAG_JPEG_QUALITY, "90") ;
img.Save ("save.jpg", prop) ;
... load image from memory under any OS
char&& * p = 0 ;
int&&& n = 0 ;
FCOXOHelper::LoadFileToBuffer ("test.jpg", p, n) ;
FCObjImage&&
img.Load (p, n, IMG_JPG) ;
IMAGE_TYPE& t = FCObjImage::GetImageHandleFactory()-&
&& QueryImageFileType("test.jpg");
... load image from DIB stream under any OS
char&& * p = 0 ;
int&&& n = 0 ;
FCOXOHelper::LoadFileToBuffer ("test.bmp", p, n) ;
p += sizeof(BITMAPFILEHEADER) ;
FCObjImage&&
img.LoadDIBStream (p, n) ;
... load image from a resource under Windows
FCObjImage&&
FCWin32::LoadImageRes (img, MAKEINTRESOURCE(nID), TEXT("JPG"),
&&&&&&&&&&&&&&&&&&&&&& IMG_JPG) ;
HMODULE&& hDll = LoadLibrary (TEXT("ResDll.dll")) ;
FCWin32::LoadImageRes (img, MAKEINTRESOURCE(nID), TEXT("JPG"),
&&&&&&&&&&&&&&&&&&&&&& IMG_JPG, hDll) ;
FCWin32::LoadImageBitmapRes (img, MAKEINTRESOURCE(nID)) ;
... load/save image via FreeImage library
FCObjImage::SetImageHandleFactory (new FCImageHandleFactory_FreeImage) ;
img.Load ("test.jpg") ;
FCObjImage::SetImageHandleFactory (new FCImageHandleFactory_Gdiplus) ;
img.Load ("test.jpg") ;
... combine ImageHandleFactory
class CMyImageFactory : public FCImageHandleFactory
protected:
&& virtual FCImageHandleBase* CreateImageHandle (IMAGE_TYPE imgType)
&&&&& switch (imgType)
&&&&&&&& case IMG_BMP : return new FCImageHandle_B
&&&&&&&& case IMG_TGA : return new FCImageHandle_T
&&&&&&&& case IMG_JPG : return new FCImageHandle_G
&&&&&&&& case IMG_GIF : return new FCImageHandle_G
&&&&&&&& case IMG_TIF : return new FCImageHandle_G
&&&&&&&& case IMG_PNG : return new FCImageHandle_G
&&&&&&&& case IMG_PCX : return new FCImageHandle_FreeI
&&&&&&&& case IMG_PSD : return new FCImageHandle_FreeI
&&&&& return 0 ;
&& virtual ~CMyImageFactory() {}
FCObjImage::SetImageHandleFactory (new CMyImageFactory) ;
FCObjImage&&
img.Load ("test.jpg") ;
... load multi-frame GIF
FCObjMultiFrame&&
img.Load ("test.gif") ;
img.GetFrame(0)-&Save ("001.jpg") ;
img.GetFrame(1)-&Save ("001.jpg") ;
... Load a jpeg's EXIF information
FCObjImage&&&&&&&
FCImageProperty&&
img.Load ("test.jpg", &prop) ;
std::string&& m = prop.QueryPropertyValue (IMAGE_TAG_EXIF_ISOSpeed) ;
std::string&& n = prop.QueryPropertyValue (IMAGE_TAG_EquipModel) ;
... draw image object under Windows
FCObjImage&&
RECT&&&&&&&& rc = {0, 0, GetSystemMetrics(SM_CXSCREEN),
&&&&&&&&&&& &&&&&&&&&&&&&GetSystemMetrics(SM_CYSCREEN)} ;
FCWin32::CaptureScreen (img, rc) ;
FCWin32::DrawImage (img, hdc, 0, 0) ;
RECT&&&& rcOnDC = {100, 100, 200, 200} ;
FCWin32::DrawImage (img, hdc, rcOnDC) ;
FCWin32::DrawImageAspect (img, hdc, rcOnDC) ;
RECT&&&& rcImg = {20, 20, 50, 50} ;
FCWin32::DrawImage (img, hdc, rcOnDC, rcImg) ;
... copy/paste image to/from Clipboard
FCObjImage&&
img.Load ("test.jpg") ;
FCWin32::CopyToClipboard (img) ;
FCWin32::GetClipboardImage (img) ;
... convert between GDI HBITMAP and FCObjImage
FCObjImage&&
img.Load ("test.jpg") ;
HBITMAP&& h = FCWin32::CreateDDBHandle (img) ;
FCWin32::CreateImageFromDDB (h, img) ;
... convert between GDI+ bitmap and FCObjImage
FCObjImage&&
img.Load ("test.jpg") ;
Gdiplus::Bitmap&& * pBmp = FCWin32::GDIPlus_CreateBitmap(img) ;
FCWin32::GDIPlus_LoadBitmap (*pBmp, img) ;
... process image
FCObjImage&&
img.Load ("test.jpg") ;
img.Stretch (nWidth, nHeight) ;
img.Stretch_Smooth (nWidth, nHeight) ;
FCPixelRotate&& aCmd (37) ;
img.SinglePixelProcessProc (aCmd) ;
FCPixelBrightness&& aCmd (150) ;&&&
img.SinglePixelProcessProc (aCmd) ;
FCPixelMosaic&& aCmd(5) ;
img.SinglePixelProcessProc (aCmd) ;
FCPixelOilPaint&& aCmd (3) ;
img.SinglePixelProcessProc (aCmd) ;
... custom image processing
class CMyPixelProcessor : public FCSinglePixelProcessBase
&& CMyPixelProcessor (int nR, int nG, int nB) : m_R(nR), m_G(nG),
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& m_B(nB) {}
&& virtual void ProcessPixel (FCObjImage* pImg, int x, int y,
&&&&&&&&&&&&&&&&&&&&&&&&&&&&& BYTE* pPixel)
&&&&& PCL_B(pPixel) = FClamp0255 (PCL_B(pPixel) + m_B) ;
&&&&& PCL_G(pPixel) = FClamp0255 (PCL_G(pPixel) + m_G) ;
&&&&& PCL_R(pPixel) = FClamp0255 (PCL_R(pPixel) + m_R) ;
&& int&& m_R, m_G, m_B ;
class CMyImageProcessor : public FCPixelWholeImageBase
&& CMyPixelProcessor (int nR, int nG, int nB) : m_R(nR), m_G(nG),
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& m_B(nB) {}
&& virtual void ProcessWholeImage (FCObjImage* pImg,
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& FCObjProgress* pProgress)
&&&&& for (int y=0 ; y & pImg-&Height() ; y++)
&&&&&&&& for (int x=0 ; x & pImg-&Width() ; x++)
&&&&&&&& {
&&&&&&&&&&& BYTE&& * p = pImg-&GetBits(x,y) ;
&&&&&&&&&&& PCL_B(p)&& = FClamp0255 (PCL_B(p) + m_B) ;
&&&&&&&&&&& PCL_G(p)&& = FClamp0255 (PCL_G(p) + m_G) ;
&&&&&&&&&&& PCL_R(p)&& = FClamp0255 (PCL_R(p) + m_R) ;
&&&&&&&& }
&&&&&&&& if (pProgress)
&&&&&&&&&&& pProgress-&SetProgress (100 * y / pImg-&Height()) ;
&&& int&& m_R, m_G, m_B ;
FCObjImage&&
img.Load ("test.jpg") ;
CMyPixelProcessor&& aCmd (20, 20, 20) ;
img.SinglePixelProcessProc (aCmd) ;
CMyImageProcessor&& aCmd (20, 20, 20) ;
img.SinglePixelProcessProc (aCmd) ;
... add text on image
FCObjImage&&
img.Load ("c://test.jpg") ;
FCObjTextLayer&& imgT ;
PACK_TextLayer&&
tp.m_bAddShadow&& = false ;
tp.m_bAntiAliased = true ;
tp.m_bBold&&&&&&& = true ;
tp.m_bItalic&&&&& = true ;
tp.m_crFont&&&&&& = PCL_RGBA(0,0,255) ;
tp.m_nFontSize&&& = 128 ;
tp.m_strFace&&&&& = "Arial" ;
tp.m_strText&&&&& = "Hello" ;
FCWin32::CreateTextLayer_GDIPlus (imgT, tp) ;
POINT&&&&&&&&&&&&&&&& pt1={0,0}, pt2={0,50} ;
FCPixelGradientLine&& aCmd (pt1, pt2, PCL_RGBA(0,0,255),
&&&&&&&&&&&&&&&&&&&&&&&&&&& FCColor::crWhite()) ;
imgT.SinglePixelProcessProc (aCmd) ;
RECT&& rc = {0, 0, imgT.Width(), imgT.Height()} ;
img.AlphaBlend (imgT, rc, rc, 100) ;
The GIMP是一个免费的、分布式的图片润饰、图象制作和处理软件,内含几乎所有图象处理所需的功能,号称Linux下的PhotoShop。GIMP在Linux系统推出时就风靡了许多绘图爱好者的喜爱,它的接口相当轻巧,但其功能却不输于专业的绘图软件;它提供了各种的影像处理工具、滤镜,还有许多的组件模块,对于要制作一个又酷又炫的网页按钮或网站Logo来说是一个非常方便好用的绘图软件,因为它也提供了许多的组件模块,你只要稍加修改一下,便可制作出一个属于你的网页按钮或网站Logo。 如今推出了For Windows版本,还不赶快试试... 注:需要安装GTK+环境包才能正常安装.
下载地址:.cn/filedown.jsp?dlid=10351&linkid=6361451
CxImage类库是一个优秀的图像操作类库。它可以快捷地存取、显示、转换各种图像。有的读者可能说,有那么多优秀的图形库,如OpenIL,FreeImage,PaintLib等等,它们可谓是功能强大,齐全,没必要用其它的类库。但我要说,这些类库基本上没有免费的,使用这些类库,你要被这样那样的许可协议所束缚。在这点上,CxImage类库是完全免费的。另外,在使用上述类库时,你会遇到重重麻烦。因为它们大部分是平台无关的,且用C语言写成,有的还夹杂着基本的C++ wrapper和成堆德编译选项的声明需要你去处理。而CxImage类库在这方面做得很好。还有让我最看好的,就是作者完全公开了源代码。相对于那些封装好的图形库和GDI+来说,这一点使我们可以进一步学习各种编解码技术,而不再浮于各种技术的表面。如果想下载CxImage,可以上下载。 CxImage类库的结构:
一个CxImage对象是一个扩展了的位图。作者只是在位图结构上添加了一些起存储信息作用的成员变量。一个CxImage对象(同时)也是一组层。每个层只有在需要时才会分配相应的缓冲区。CxImage::pDib代表着背景图像,CxImage::pAlpha代表着透明层,CxImage::pSelection代表着被选中的层,被用来创建图像处理时让用户感兴趣的区域。在这三个特殊层面的基础上,你可以增加一些额外的层,这些层可以存储在CxImage::pLayers中。一般说来,层是一个完整的CxImage对象。因此,你可以构造很复杂的嵌套层。下面是CxImage的一些成员变量:
class CxImage
protected:
void* pD&&&&&&&&&&& //包含文件头,调色板等等
BITMAPINFOHEADER //标准的文件头(位图)
CXIMAGEINFO&&&&& //扩展了的信息
BYTE* pS&&&&& //用户选中的区域
BYTE* pA&&&&&&&&& //alpha通道
CxImage** pL&&&& //通用层
typedef struct tagCxImageInfo {
DWORD&& dwEffW&&&&&& //DWORD 扫描线宽
BYTE*&& pI&&&&&&&&&& //图像位数
void*&& pG&&&&&&&&&& //if this is a ghost, pGhost point to the body
DWORD&& dwT&&&&&&&&&& //原图像的格式
char&&& szLastError[256]; //出错信息
long&&& nP&&&&&&& //监视循环的次数
long&&& nE&&&&&&&&& //跳出标志
long&&& nBkgndI&& &&&//GIF, PNG, MNG格式使用
RGBQUAD nBkgndC&&&&& //RGB三原色透明度
BYTE&&& nQ&&&&&&&& //JPEG格式使用
long&&& nF&&&&&&&&&& //TIF, GIF, MNG使用 :实际的帧数
long&&& nNumF&&&&&& //TIF, GIF, MNG使用 :帧总数
DWORD&& dwFrameD&&&& //GIF, MNG使用
long&&& xDPI;&&&&& &&&&&&&//水平分辨率
long&&& yDPI;&&&&&&&&&&&& //垂直分辨率
RECT&&& rSelectionB&&& //选中的矩形区
BYTE&&& nAlphaM&&&&&&& //阴影的最大不透明度
bool&&& bAlphaPaletteE& //如果调色板中有Alpha通道则为真
bool&&& bE&&&&&&&& //打开绘图函数
long&&& xO
long&&& yO
DWORD&& dwEncodeO&& //一些编码选项
RGBQUAD last_c;&&&&&&&&&& //一些优化选项
BYTE&&& last_c_
bool&&& last_c_
long&&& nNumL
DWORD&& dwF
} CXIMAGEINFO;
要在picture box中显示一个png格式的文件,只需:
CxImage image("myfile.png", CXIMAGE_FORMAT_PNG);
HBITMAP m_bitmap = image.MakeBitmap(m_picture.GetDC()-&m_hDC);
m_picture.SetBitmap(m_bitmap);
其它格式则类推。
Examples: how to ...
... convert from a format to another
// bmp -& jpg
image.Load("image.bmp", CXIMAGE_FORMAT_BMP);
if (image.IsValid()){
if(!image.IsGrayScale()) image.IncreaseBpp(24);
image.SetJpegQuality(99);
image.Save("image.jpg",CXIMAGE_FORMAT_JPG);
// png -& tif
image.Load("image.png", CXIMAGE_FORMAT_PNG);
if (image.IsValid()){
image.Save("image.tif",CXIMAGE_FORMAT_TIF);
... load an image resource
//Load the resource IDR_PNG1 from the PNG resource type
CxImage* newImage = new CxImage();
newImage-&LoadResource(FindResource(NULL,MAKEINTRESOURCE(IDR_PNG1),
"PNG"),CXIMAGE_FORMAT_PNG);
or//Load the resource IDR_JPG1 from DLL
CxImage* newImage = new CxImage();
HINSTANCE hdll=LoadLibrary("imagelib.dll");
if (hdll){
HRSRC hres=FindResource(hdll,MAKEINTRESOURCE(IDR_JPG1),"JPG");
newImage-&LoadResource(hres,CXIMAGE_FORMAT_JPG,hdll);
FreeLibrary(hdll);
HBITMAP bitmap = ::LoadBitmap(AfxGetInstanceHandle(),
MAKEINTRESOURCE(IDB_BITMAP1)));
CxImage *newImage = new CxImage();
newImage-&CreateFromHBITMAP(bitmap);
... decode an image from memory
CxImage image((BYTE*)buffer,size,image_type);
orCxMemFile memfile((BYTE*)buffer,size);
CxImage image(&memfile,image_type);
orCxMemFile memfile((BYTE*)buffer,size);
CxImage* image = new CxImage();
image-&Decode(&memfile,type);
... encode an image in memory
long size=0;
BYTE* buffer=0;
image.Encode(buffer,size,image_type);
free(buffer);
memfile.Open();
image.Encode(&memfile,image_type);
BYTE* buffer = memfile.GetBuffer();
long size = memfile.Size();
free(buffer);
... create a multipage TIFF
CxImage *pimage[3];
pimage[0]=&image1;
pimage[1]=&image2;
pimage[2]=&image3;
hFile = fopen("multipage.tif","w+b");
CxImageTIF
multiimage.Encode(hFile,pimage,3);
fclose(hFile);
orFILE* hF
hFile = fopen("c://multi.tif","w+b");
CxImageTIF
image.Load("c://1.tif",CXIMAGE_FORMAT_TIF);
image.Encode(hFile,true);
image.Load("c://2.bmp",CXIMAGE_FORMAT_BMP);
image.Encode(hFile,true);
image.Load("c://3.png",CXIMAGE_FORMAT_PNG);
image.Encode(hFile);
fclose(hFile);
... copy/paste an image
HANDLE hDIB = image-&CopyToHandle();
if (::OpenClipboard(AfxGetApp()-&m_pMainWnd-&GetSafeHwnd())) {
if(::EmptyClipboard()) {
if (::SetClipboardData(CF_DIB,hDIB) == NULL ) {
AfxMessageBox( "Unable to set Clipboard data" );
}&&& }&&& }
CloseClipboard();
HANDLE hBitmap=NULL;
CxImage *newima = new CxImage();
if (OpenClipboard()) hBitmap=GetClipboardData(CF_DIB);
if (hBitmap) newima-&CreateFromHANDLE(hBitmap);
CloseClipboard();
需要大家注意的是:整个CxImage类库非常大。如果你只需要能处理其中的几种格式,你可以在主要的头文件ximage.h中找到一些开关选项来关闭一些图像库。JPG、PNG、TIFF中的每一个库,都会向最终程序增加约100KB的内容。而CxImage类库压缩后只有约60KB。所以,你需要谨慎挑选一些你真正需要的类库。作者提供的示例工程在编译后,你会发现如下一些文件: &CxImage : cximage.lib - static library &CxImageCrtDll : cximagecrt.dll - DLL not using mfc &CxImageMfcDll : cximage.dll - DLL using mfc &Demo : demo.exe - program linked with cximage.lib and the C libraries &DemoDll : demodll.exe - program linked with cximagecrt.dll &j2k,jasper,jbig,jpeg,png,tiff,zlib : static C libraries 构建这些工程需要耗费几分钟的时间(中间文件可达60MB)。下面则是使用CxImage类库前必须设置的一些参数:
Project Settings
|&& |- Code Generation
|&& |&& |- Use run-time library : Multithreaded DLL (must be the same for
|&& |&& |& all the linked libraries)
|&& |&& |- Struct member alignment : must be the same for all the linked
|&& |&& |& libraries
|&& |- Precompiled headers : not using precompiled headers
|&& |- Preprocessor
|&&&&&& |- Additional Include Directories:& ../cximage
|- General
|- Object/library modules: ../png/Debug/png.lib
../jpeg/Debug/jpeg.lib
../zlib/Debug/zlib.lib
../tiff/Debug/tiff.lib
../cximage/Debug/cximage.lib& ..
版权声明:本文为博主原创文章,未经博主允许不得转载。
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:2707841次
积分:30758
积分:30758
排名:第73名
原创:433篇
转载:383篇
评论:1029条
(3)(1)(2)(1)(3)(2)(1)(7)(2)(2)(2)(4)(2)(4)(7)(1)(1)(21)(16)(3)(2)(3)(1)(3)(2)(7)(10)(5)(6)(7)(12)(3)(7)(7)(15)(9)(9)(18)(21)(7)(9)(7)(8)(44)(10)(26)(5)(2)(1)(7)(12)(1)(2)(1)(3)(7)(11)(10)(2)(3)(1)(1)(1)(9)(7)(3)(7)(1)(2)(5)(3)(1)(13)(92)(103)(25)(2)(57)(26)(4)(45)}

我要回帖

更多关于 rar压缩包密码破解 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信