CxImage的編譯及簡單使用舉例

2021-07-05 18:54:13 字數 2793 閱讀 4829

cximage的編譯及簡單使用舉例

2、  解壓縮後,以管理員身份開啟cximagefull_vc10.sln工程,在編譯之前先將每個工程屬性的character set由原先的use unicode character set改為use multi-bytecharacter set,首先編譯jasper、jbig、jpeg、libdcr、libpsd、mng、png、tiff、zlib這9個庫,然後編譯cximage,cximagecrtdll,在接著編譯cximagemfcdll,在編譯cximagemfcdll之前,先修改其屬性,linker->input->additional dependencies,將$(outdir)png.lib等改為../../debug/png.lib(../../release/png.lib),最後編譯demo、demodll;全部編譯完後即可生成相應的靜態庫和動態庫;

3、  目前cximage支援的影象格式包括:bmp、gif、jpg、png、ico、tif、tga、pcx、wbmp、wmf、jp2、jpc、pgx、pnm、ras、jbg、mng、ska、raw和psd;

4、  cximage中所包含的影象操作可通過開啟index.htm來檢視;        

5、新建乙個控制台工程testcximage,將character set設為use multi-byte character set,各個檔案的內容為:

stdafx.h:

[cpp] view plaincopy

#pragma once  

#include "targetver.h"  

#include

#include "../../cximage702_full/cximage/ximage.h"  

stdafx.cpp:

[cpp] view plaincopy

#include "stdafx.h"  

// todo: reference any additional headers you need in stdafx.h  

// and not in this file  

#ifdef _debug  

#pragma comment(lib, "../../cximage702_full/debug/cximage.lib")  

#pragma comment(lib, "../../cximage702_full/debug/jasper.lib")  

#pragma comment(lib, "../../cximage702_full/debug/jbig.lib")  

#pragma comment(lib, "../../cximage702_full/debug/jpeg.lib")  

#pragma comment(lib, "../../cximage702_full/debug/libdcr.lib")  

#pragma comment(lib, "../../cximage702_full/debug/libpsd.lib")  

#pragma comment(lib, "../../cximage702_full/debug/mng.lib")  

#pragma comment(lib, "../../cximage702_full/debug/png.lib")  

#pragma comment(lib, "../../cximage702_full/debug/tiff.lib")  

#pragma comment(lib, "../../cximage702_full/debug/zlib.lib")  

#else  

#pragma comment(lib, "../../cximage702_full/release/cximage.lib")   

#pragma comment(lib, "../../cximage702_full/release/jasper.lib")  

#pragma comment(lib, "../../cximage702_full/release/jbig.lib")  

#pragma comment(lib, "../../cximage702_full/release/jpeg.lib")  

#pragma comment(lib, "../../cximage702_full/release/libdcr.lib")  

#pragma comment(lib, "../../cximage702_full/release/libpsd.lib")  

#pragma comment(lib, "../../cximage702_full/release/mng.lib")  

#pragma comment(lib, "../../cximage702_full/release/png.lib")  

#pragma comment(lib, "../../cximage702_full/release/tiff.lib")  

#pragma comment(lib, "../../cximage702_full/release/zlib.lib")  

#endif  

testcximage.cpp:

[cpp] view plaincopy

#include "stdafx.h"  

#include

#include

using namespace std;  

int main(int argc, char* argv)  

//顯示

cximage image;

if(image.load("name",型別))

參考**:

pjsip的編譯及簡單使用

2.編譯 目錄下的readme.txt檔案中有編譯說明,關於windows下的注意點如下 building win32 target with microsoft visual studio 新建乙個空檔案pjlib include pj config site.h後,編譯pjsua工程出現以下錯誤...

pjsip的編譯及簡單使用

2.編譯 目錄下的readme.txt檔案中有編譯說明,關於windows下的注意點如下 building win32 target with microsoft visual studio generally we can just do these steps 1.visual studio 6...

SDL編譯及簡單使用

型別 sdl windwoevent 視窗事件 sdl keyboardevent 鍵盤事件 sdl mousemotionevent 滑鼠事件 事件處理 sdl pollevent 輪訓 sdl waitevent 等待事件,超時機制 推薦使用 包含sdl標頭檔案 include 初始化sdl s...