锘??xml version="1.0" encoding="utf-8" standalone="yes"?>国产欧美视频一区二区三区,韩国一区二区三区在线观看 ,亚洲一区日本http://m.shnenglu.com/swo2006/category/3203.htmlzh-cnMon, 19 May 2008 18:41:46 GMTMon, 19 May 2008 18:41:46 GMT60C++鍥懼艦棰嗗煙鏂伴椈涓庤祫婧?/title><link>http://m.shnenglu.com/swo2006/articles/15119.html</link><dc:creator>swo</dc:creator><author>swo</author><pubDate>Mon, 13 Nov 2006 01:23:00 GMT</pubDate><guid>http://m.shnenglu.com/swo2006/articles/15119.html</guid><wfw:comment>http://m.shnenglu.com/swo2006/comments/15119.html</wfw:comment><comments>http://m.shnenglu.com/swo2006/articles/15119.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.shnenglu.com/swo2006/comments/commentRss/15119.html</wfw:commentRss><trackback:ping>http://m.shnenglu.com/swo2006/services/trackbacks/15119.html</trackback:ping><description><![CDATA[http://www.kaidianle.com/article/list22277.html<img src ="http://m.shnenglu.com/swo2006/aggbug/15119.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.shnenglu.com/swo2006/" target="_blank">swo</a> 2006-11-13 09:23 <a href="http://m.shnenglu.com/swo2006/articles/15119.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>BMP浣嶅浘鏂囦歡緇撴瀯鍙?qiáng)邈^婊戠緝鏀?/title><link>http://m.shnenglu.com/swo2006/articles/14750.html</link><dc:creator>swo</dc:creator><author>swo</author><pubDate>Mon, 06 Nov 2006 14:25:00 GMT</pubDate><guid>http://m.shnenglu.com/swo2006/articles/14750.html</guid><wfw:comment>http://m.shnenglu.com/swo2006/comments/14750.html</wfw:comment><comments>http://m.shnenglu.com/swo2006/articles/14750.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.shnenglu.com/swo2006/comments/commentRss/14750.html</wfw:commentRss><trackback:ping>http://m.shnenglu.com/swo2006/services/trackbacks/14750.html</trackback:ping><description><![CDATA[ <span id="hvzpftn" class="unnamed3"> <p> <font face="瀹嬩綋" size="2">鐢ㄦ櫘閫氭柟娉曟樉紺築MP浣嶅浘錛屽崰鍐呭瓨澶э紝閫熷害鎱紝鍦ㄥ浘褰㈢緝?yōu)畯鏃跺Q屽け鐪熶弗閲?鍦ㄤ綆棰滆壊浣嶆暟鐨勮澶囦笂鏄劇ず楂橀鑹蹭綅鏁扮殑鍥懼艦鍥懼艦鏃跺け鐪熷ぇ銆傛湰鏂囬噰鐢ㄨ棰戝嚱鏁版樉紺築MP浣嶅浘錛屽彲浠ユ秷闄や互涓婄殑緙虹偣銆?/font> </p> <p> <font face="瀹嬩綋" size="2">涓銆丅MP鏂囦歡緇撴瀯</font> </p> <p> <font face="瀹嬩綋" size="2">BMP鏂囦歡緇勬垚<br />BMP鏂囦歡鐢辨枃浠跺ご銆佷綅鍥句俊鎭ご銆侀鑹蹭俊鎭拰鍥懼艦鏁版嵁鍥涢儴鍒嗙粍鎴愩?<br />BMP鏂囦歡澶?br />BMP鏂囦歡澶存暟鎹粨鏋勫惈鏈塀MP鏂囦歡鐨勭被鍨嬨佹枃浠跺ぇ灝忓拰浣嶅浘璧峰浣嶇疆絳変俊鎭?<br />鍏剁粨鏋勫畾涔夊涓?<br />typedef struct tagBITMAPFILEHEADER<br />{<br />WORDbfType; // 浣嶅浘鏂囦歡鐨勭被鍨嬶紝蹇呴』涓築M<br />DWORD bfSize; // 浣嶅浘鏂囦歡鐨勫ぇ灝忥紝浠ュ瓧鑺備負(fù)鍗曚綅 <br />WORDbfReserved1; // 浣嶅浘鏂囦歡淇濈暀瀛楋紝蹇呴』涓?<br />WORDbfReserved2; // 浣嶅浘鏂囦歡淇濈暀瀛楋紝蹇呴』涓?<br />DWORD bfOffBits; // 浣嶅浘鏁版嵁鐨勮搗濮嬩綅緗紝浠ョ浉瀵逛簬浣嶅浘<br />// 鏂囦歡澶寸殑鍋忕Щ閲忚〃紺猴紝浠ュ瓧鑺備負(fù)鍗曚綅<br />} BITMAPFILEHEADER;</font> </p> <p> <br /> <font face="瀹嬩綋" size="2">3. 浣嶅浘淇℃伅澶?/font> </p> <p> <br /> <font face="瀹嬩綋" size="2">BMP浣嶅浘淇℃伅澶存暟鎹敤浜庤鏄庝綅鍥劇殑灝哄絳変俊鎭?br />typedef struct tagBITMAPINFOHEADER{<br />DWORD biSize; // 鏈粨鏋勬墍鍗犵敤瀛楄妭鏁?br />LONGbiWidth; // 浣嶅浘鐨勫搴︼紝浠ュ儚绱犱負(fù)鍗曚綅<br />LONGbiHeight; // 浣嶅浘鐨勯珮搴︼紝浠ュ儚绱犱負(fù)鍗曚綅<br />WORD biPlanes; // 鐩爣璁懼鐨勭駭鍒紝蹇呴』涓?<br />WORD biBitCount// 姣忎釜鍍忕礌鎵闇鐨勪綅鏁幫紝蹇呴』鏄?(鍙岃壊),<br />// 4(16鑹?錛?(256鑹?鎴?4(鐪熷僵鑹?涔嬩竴<br />DWORD biCompression; // 浣嶅浘鍘嬬緝綾誨瀷錛屽繀欏繪槸 0(涓嶅帇緙?,<br />// 1(BI_RLE8鍘嬬緝綾誨瀷)鎴?(BI_RLE4鍘嬬緝綾誨瀷)涔嬩竴<br />DWORD biSizeImage; // 浣嶅浘鐨勫ぇ灝忥紝浠ュ瓧鑺備負(fù)鍗曚綅<br />LONGbiXPelsPerMeter; // 浣嶅浘姘村鉤鍒嗚鯨鐜囷紝姣忕背鍍忕礌鏁?br />LONGbiYPelsPerMeter; // 浣嶅浘鍨傜洿鍒嗚鯨鐜囷紝姣忕背鍍忕礌鏁?br />DWORD biClrUsed;// 浣嶅浘瀹為檯浣跨敤鐨勯鑹茶〃涓殑棰滆壊鏁?br />DWORD biClrImportant;// 浣嶅浘鏄劇ず榪囩▼涓噸瑕佺殑棰滆壊鏁?br />} BITMAPINFOHEADER;</font> </p> <p> <br /> <font face="瀹嬩綋" size="2">4. 棰滆壊琛?/font> </p> <p> <font face="瀹嬩綋" size="2">銆銆棰滆壊琛ㄧ敤浜庤鏄庝綅鍥句腑鐨勯鑹詫紝瀹冩湁鑻ュ共涓〃欏癸紝姣忎竴涓〃欏規(guī)槸涓涓猂GBQUAD綾誨瀷鐨勭粨鏋勶紝瀹氫箟涓縐嶉鑹層俁GBQUAD緇撴瀯鐨勫畾涔夊涓?<br />typedef struct tagRGBQUAD {<br />BYTErgbBlue;// 钃濊壊鐨勪寒搴?鍊艱寖鍥翠負(fù)0-255)<br />BYTErgbGreen; // 緇胯壊鐨勪寒搴?鍊艱寖鍥翠負(fù)0-255)<br />BYTErgbRed; // 綰㈣壊鐨勪寒搴?鍊艱寖鍥翠負(fù)0-255)<br />BYTErgbReserved;// 淇濈暀錛屽繀欏諱負(fù)0<br />} RGBQUAD;<br />棰滆壊琛ㄤ腑RGBQUAD緇撴瀯鏁版嵁鐨勪釜鏁版湁biBitCount鏉ョ‘瀹?<br />褰揵iBitCount=1,4,8鏃訛紝鍒嗗埆鏈?,16,256涓〃欏?<br />褰揵iBitCount=24鏃訛紝娌℃湁棰滆壊琛ㄩ」銆?br />浣嶅浘淇℃伅澶村拰棰滆壊琛ㄧ粍鎴愪綅鍥句俊鎭紝BITMAPINFO緇撴瀯瀹氫箟濡備笅:<br />typedef struct tagBITMAPINFO {<br />BITMAPINFOHEADER bmiHeader; // 浣嶅浘淇℃伅澶?br />RGBQUAD bmiColors[1]; // 棰滆壊琛?br />} BITMAPINFO;</font> </p> <p> <br /> <font face="瀹嬩綋" size="2">5. 浣嶅浘鏁版嵁<br />銆銆浣嶅浘鏁版嵁璁板綍浜?jiǎn)浣嶅泟勬瘡涓涓儚绱犲鹼紝璁板綍欏哄簭鏄湪鎵弿琛屽唴鏄粠宸﹀埌鍙?鎵弿琛屼箣闂存槸浠庝笅鍒頒笂銆備綅鍥劇殑涓涓儚绱犲兼墍鍗犵殑瀛楄妭鏁?<br />褰揵iBitCount=1鏃訛紝8涓儚绱犲崰1涓瓧鑺?<br />褰揵iBitCount=4鏃訛紝2涓儚绱犲崰1涓瓧鑺?<br />褰揵iBitCount=8鏃訛紝1涓儚绱犲崰1涓瓧鑺?<br />褰揵iBitCount=24鏃?1涓儚绱犲崰3涓瓧鑺?<br />Windows瑙勫畾涓涓壂鎻忚鎵鍗犵殑瀛楄妭鏁板繀欏繪槸<br />4鐨勫嶆暟(鍗充互long涓哄崟浣?,涓嶈凍鐨勪互0濉厖錛?br />涓涓壂鎻忚鎵鍗犵殑瀛楄妭鏁拌綆楁柟娉?<br />DataSizePerLine= (biWidth* biBitCount+31)/8; <br />// 涓涓壂鎻忚鎵鍗犵殑瀛楄妭鏁?br />DataSizePerLine= DataSizePerLine/4*4; // 瀛楄妭鏁板繀欏繪槸4鐨勫嶆暟<br />浣嶅浘鏁版嵁鐨勫ぇ灝?涓嶅帇緙╂儏鍐典笅):<br />DataSize= DataSizePerLine* biHeight;</font> </p> <p> <br /> <font face="瀹嬩綋" size="2">浜屻丅MP浣嶅浘涓鑸樉紺烘柟娉?/font> </p> <p> <font face="瀹嬩綋" size="2">1. 鐢寵鍐呭瓨絀洪棿鐢ㄤ簬瀛樻斁浣嶅浘鏂囦歡<br />銆銆GlobalAlloc(GHND錛孎ileLength);</font> </p> <p> <font face="瀹嬩綋" size="2">2. 浣嶅浘鏂囦歡璇誨叆鎵鐢寵鍐呭瓨絀洪棿涓?br />銆銆 LoadFileToMemory( mpBitsSrc錛宮FileName);</font> </p> <p> <font face="瀹嬩綋" size="2">3. 鍦∣nPaint絳夊嚱鏁頒腑鐢ㄥ垱寤烘樉紺虹敤浣嶅浘<br />銆銆鐢–reateDIBitmap()鍒涘緩鏄劇ず鐢ㄤ綅鍥撅紝鐢–reateCompatibleDC()鍒涘緩鍏煎DC,<br />銆銆鐢⊿electBitmap()閫夋嫨鏄劇ず浣嶅浘銆?/font> </p> <p> <font face="瀹嬩綋" size="2">4. 鐢˙itBlt鎴朣tretchBlt絳夊嚱鏁版樉紺轟綅鍥?/font> </p> <p> <font face="瀹嬩綋" size="2">5. 鐢―eleteObject()鍒犻櫎鎵鍒涘緩鐨勪綅鍥?/font> </p> <p> <font face="瀹嬩綋" size="2">銆銆浠ヤ笂鏂規(guī)硶鐨勭己鐐規(guī)槸: 1)鏄劇ず閫熷害鎱? 2) 鍐呭瓨鍗犵敤澶? 3) 浣嶅浘鍦ㄧ緝?yōu)畯鏄窘C烘椂鍥懼艦澶辯湡澶?(鍙氳繃瀹夎瀛椾綋騫蟲粦杞歡鏉ヨВ鍐?; 4) 鍦ㄤ綆棰滆壊浣嶆暟鐨勮澶囦笂(濡?56鏄劇ず妯″紡)鏄劇ず楂橀鑹蹭綅鏁扮殑鍥懼艦(濡傜湡褰╄壊)鍥懼艦澶辯湡涓ラ噸銆?/font> </p> <p> <font face="瀹嬩綋" size="2">涓夈丅MP浣嶅浘緙╂斁鏄劇ず<br />銆銆 鐢―rawDib瑙嗛鍑芥暟鏉ユ樉紺轟綅鍥撅紝鍐呭瓨鍗犵敤灝戯紝閫熷害蹇紝鑰屼笖榪樺彲浠ュ鍥懼艦榪涜娣″寲(Dithering)澶勭悊銆傛貳鍖栧鐞嗘槸涓縐嶅浘褰㈢畻娉曪紝鍙互鐢ㄦ潵鍦ㄤ竴涓敮鎸佹瘮鍥懼儚鎵鐢ㄩ鑹茶灝戠殑璁懼涓婃樉紺哄僵鑹插浘鍍忋侭MP浣嶅浘鏄劇ず鏂規(guī)硶濡備笅:</font> </p> <p> <font face="瀹嬩綋" size="2">1. 鎵撳紑瑙嗛鍑芥暟DrawDibOpen()錛屼竴鑸斁鍦ㄥ湪鏋勯犲嚱鏁頒腑</font> </p> <p> <font face="瀹嬩綋" size="2">2. 鐢寵鍐呭瓨絀洪棿鐢ㄤ簬瀛樻斁浣嶅浘鏂囦歡<br />銆銆GlobalAlloc(GHND錛孎ileLength);</font> </p> <p> <font face="瀹嬩綋" size="2">3. 浣嶅浘鏂囦歡璇誨叆鎵鐢寵鍐呭瓨絀洪棿涓?--- <br />銆銆LoadFileToMemory( mpBitsSrc錛宮FileName);</font> </p> <p> <font face="瀹嬩綋" size="2">4. 鍦∣nPaint絳夊嚱鏁頒腑鐢―rawDibRealize()錛孌rawDibDraw()鏄劇ず浣嶅浘</font> </p> <p> <font face="瀹嬩綋" size="2">5. 鍏抽棴瑙嗛鍑芥暟DrawDibClose(),涓鑸斁鍦ㄥ湪鏋愭瀯鍑芥暟涓?/font> </p> <p> <font face="瀹嬩綋" size="2">銆銆浠ヤ笂鏂規(guī)硶鐨勪紭鐐規(guī)槸: 1)鏄劇ず閫熷害蹇? 2) 鍐呭瓨鍗犵敤灝? 3) 緙╂斁鏄劇ず鏃跺浘褰㈠け鐪熷皬,4) 鍦ㄤ綆棰滆壊浣嶆暟鐨勮澶囦笂鏄劇ず楂橀鑹蹭綅鏁扮殑鍥懼艦鍥懼艦鏃跺け鐪熷皬; 5) 閫氳繃鐩存帴澶勭悊浣嶅浘鏁版嵁錛屽彲浠ュ埗浣滅畝鍗曞姩鐢匯?/font> </p> <p> <font face="瀹嬩綋" size="2">鍥涖丆ViewBimap綾葷紪紼嬭鐐?/font> </p> <p> <font face="瀹嬩綋" size="2">1. 鍦–ViewBimap綾諱腑娣誨姞瑙嗛鍑芥暟絳夋垚鍛?/font> </p> <p> <font face="瀹嬩綋" size="2">HDRAWDIB m_hDrawDib; // 瑙嗛鍑芥暟<br />HANDLEmhBitsSrc; // 浣嶅浘鏂囦歡鍙ユ焺(鍐呭瓨)<br />LPSTR mpBitsSrc; // 浣嶅浘鏂囦歡鍦板潃(鍐呭瓨)<br />BITMAPINFOHEADER *mpBitmapInfo; // 浣嶅浘淇℃伅澶?/font> </p> <p> <font face="瀹嬩綋" size="2">2. 鍦–ViewBimap綾繪瀯閫犲嚱鏁頒腑娣誨姞鎵撳紑瑙嗛鍑芥暟<br />銆銆m_hDrawDib= DrawDibOpen();</font> </p> <p> <font face="瀹嬩綋" size="2">3. 鍦–ViewBimap綾繪瀽鏋勫嚱鏁頒腑娣誨姞鍏抽棴瑙嗛鍑芥暟</font> </p> <p> <font face="瀹嬩綋" size="2">if( m_hDrawDib != NULL)<br />{<br />DrawDibClose( m_hDrawDib);<br />m_hDrawDib = NULL;<br />}</font> </p> <p> <font face="瀹嬩綋" size="2">4. 鍦–ViewBimap綾誨浘褰㈡樉紺哄嚱鏁癘nPaint涓坊鍔燝raphicDraw()<br />voidCViewBitmap::OnPaint()<br />{<br />CPaintDC dc(this); // device context for painting<br />GraphicDraw( );<br />}</font> </p> <p> <font face="瀹嬩綋" size="2">voidCViewBitmap::GraphicDraw( void )<br />{<br />CClientDC dc(this); // device context for painting<br />BITMAPFILEHEADER *pBitmapFileHeader;<br />ULONG bfoffBits= 0;<br />CPoint Wid;</font> </p> <p> <font face="瀹嬩綋" size="2">// 鍥懼艦鏂囦歡鍚嶆湁鏁?(=0 BMP)<br />if( mBitmapFileType < ID_BITMAP_BMP ) return;</font> </p> <p> <font face="瀹嬩綋" size="2">// 鍥懼艦鏂囦歡鍚嶆湁鏁?(=0 BMP)<br />// 鍑嗗鏄劇ず鐪熷僵浣嶅浘<br />pBitmapFileHeader= (BITMAPFILEHEADER *) mpBitsSrc;<br />bfoffBits= pBitmapFileHeader->bfOffBits;</font> </p> <p> <font face="瀹嬩綋" size="2">// 浣跨敤鏅氬嚱鏁版樉紺轟綅鍥?/font> </p> <p> <font face="瀹嬩綋" size="2">if( m_hDrawDib == NULL || mDispMethod == 0)<br />{<br />HBITMAP hBitmap=::CreateDIBitmap(dc.m_hDC,<br />mpBitmapInfo, CBM_INIT, mpBitsSrc+bfoffBits,<br />(LPBITMAPINFO) mpBitmapInfo,DIB_RGB_COLORS); <br />// 寤虹珛浣嶅浘<br />HDC hMemDC=::CreateCompatibleDC(dc.m_hDC);// 寤虹珛鍐呭瓨<br />HBITMAP hBitmapOld= SelectBitmap(hMemDC, hBitmap); // 閫夋嫨瀵硅薄<br />// 鎴愬憳CRect mDispR鐢ㄤ簬鎸囩ず鍥懼艦鏄劇ず鍖哄煙鐨勫ぇ灝?<br />// 鎴愬憳CPoint mPos鐢ㄤ簬鎸囩ず鍥懼艦鏄劇ず璧峰浣嶇疆鍧愭爣.<br />if( mPos.x > (mpBitmapInfo- >biWidth - mDispR.Width() ))<br />mPos.x= mpBitmapInfo->biWidth - mDispR.Width() ;<br />if( mPos.y > (mpBitmapInfo- >biHeight- mDispR.Height()))<br />mPos.y= mpBitmapInfo- >biHeight- mDispR.Height();<br />if( mPos.x < 0 ) mPos.x= 0;<br />if( mPos.y < 0 ) mPos.y= 0;</font> </p> <p> <font face="瀹嬩綋" size="2">if( mFullViewTog == 0)<br />{<br />// 鏄劇ず鐪熷僵浣嶅浘<br />::BitBlt(dc.m_hDC,0,0, mDispR.Width(), mDispR.Height(),<br />hMemDC,mPos.x,mPos.y, SRCCOPY);<br />} else {<br />::StretchBlt(dc.m_hDC,0,0, mDispR.Width(), mDispR.Height(),<br />hMemDC,0,0, mpBitmapInfo- >biWidth, mpBitmapInfo-<br />>biHeight, SRCCOPY);<br />}<br />// 緇撴潫鏄劇ず鐪熷僵浣嶅浘<br />::DeleteObject(SelectObject(hMemDC,hBitmapOld)); <br />// 鍒?闄?浣?鍥?br />} else {</font> </p> <p> <font face="瀹嬩綋" size="2">// 浣跨敤瑙嗛鍑芥暟鏄劇ず浣嶅浘</font> </p> <p> <font face="瀹嬩綋" size="2">if( mPos.x > (mpBitmapInfo- >biWidth - mDispR.Width() ))<br />mPos.x= mpBitmapInfo- >biWidth - mDispR.Width() ;<br />if( mPos.y > (mpBitmapInfo- >biHeight- mDispR.Height()))<br />mPos.y= mpBitmapInfo- >biHeight- mDispR.Height();<br />if( mPos.x < 0 ) mPos.x= 0;<br />if( mPos.y < 0 ) mPos.y= 0;</font> </p> <p> <font face="瀹嬩綋" size="2">// 鏄劇ず鐪熷僵浣嶅浘<br />DrawDibRealize( m_hDrawDib, dc.GetSafeHdc(), TRUE);</font> </p> <p> <font face="瀹嬩綋" size="2">if( mFullViewTog == 0)<br />{<br />Wid.x= mDispR.Width();<br />Wid.y= mDispR.Height();<br />// 1:1 鏄劇ず鏃? 涓嶈兘澶т簬鍥懼艦澶у皬<br />if( Wid.x > mpBitmapInfo- >biWidth )<br />Wid.x = mpBitmapInfo- >biWidth;<br />if( Wid.y > mpBitmapInfo- >biHeight)<br />Wid.y = mpBitmapInfo- >biHeight;</font> </p> <p> <font face="瀹嬩綋" size="2">DrawDibDraw( m_hDrawDib, dc.GetSafeHdc()<br />, 0, 0, Wid.x, Wid.y,<br />mpBitmapInfo, (LPVOID) (mpBitsSrc+bfoffBits),<br />mPos.x, mPos.y, Wid.x, Wid.y, DDF_BACKGROUNDPAL);<br />} else {<br />DrawDibDraw( m_hDrawDib, dc.GetSafeHdc(),<br />0, 0, mDispR.Width(), mDispR.Height(),<br />mpBitmapInfo, (LPVOID)</font> </p> </span> <img src ="http://m.shnenglu.com/swo2006/aggbug/14750.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.shnenglu.com/swo2006/" target="_blank">swo</a> 2006-11-06 22:25 <a href="http://m.shnenglu.com/swo2006/articles/14750.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>浣嶅浘[杞澆]http://m.shnenglu.com/swo2006/articles/11285.htmlswoswoWed, 16 Aug 2006 05:09:00 GMThttp://m.shnenglu.com/swo2006/articles/11285.htmlhttp://m.shnenglu.com/swo2006/comments/11285.htmlhttp://m.shnenglu.com/swo2006/articles/11285.html#Feedback0http://m.shnenglu.com/swo2006/comments/commentRss/11285.htmlhttp://m.shnenglu.com/swo2006/services/trackbacks/11285.html闃呰鍏ㄦ枃

swo 2006-08-16 13:09 鍙戣〃璇勮
]]>
涓縐嶄綅鍥劇緝鏀劇殑蹇熺畻娉?amp;PSD鏍煎紡鐨勫紑鍙?amp;PSD鏍煎紡鏂囦歡鐨勮鍙?/title><link>http://m.shnenglu.com/swo2006/articles/11279.html</link><dc:creator>swo</dc:creator><author>swo</author><pubDate>Wed, 16 Aug 2006 02:42:00 GMT</pubDate><guid>http://m.shnenglu.com/swo2006/articles/11279.html</guid><wfw:comment>http://m.shnenglu.com/swo2006/comments/11279.html</wfw:comment><comments>http://m.shnenglu.com/swo2006/articles/11279.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.shnenglu.com/swo2006/comments/commentRss/11279.html</wfw:commentRss><trackback:ping>http://m.shnenglu.com/swo2006/services/trackbacks/11279.html</trackback:ping><description><![CDATA[ <table border="0" cellpadding="4" width="100%"> <tbody> <tr> <td height="19"> <table border="0" cellpadding="3" cellspacing="3" width="100%"> <tbody> <tr> <td> <a >CSDN</a> - <a >鏂囨。涓績(jī)</a> - <font color="#003399"><a id="ArticleTitle1_ArticleTitle1_hlClass" >鍏朵粬寮鍙戣璦 </a></font></td> <td align="right"> 闃呰錛?span id="ArticleTitle1_ArticleTitle1_lblReadCount">42</span> 聽聽璇勮錛? <span id="ArticleTitle1_ArticleTitle1_lblCommentCount">0</span> 聽聽 <a >鍙備笌璇勮</a></td> </tr> </tbody> </table> <table bgcolor="#eeeeee" border="0" cellpadding="3" cellspacing="3" width="100%"> <tbody> <tr> <td height="0" nowrap="nowrap" width="60"> <br /> </td> <td> <br /> </td> </tr> <tr> <td align="center" bgcolor="#003399" height="16" nowrap="nowrap"> <font color="#ffffff">鏍囬</font> </td> <td> <b>聽 <span id="ArticleTitle1_ArticleTitle1_lblTitle">涓縐嶄綅鍥劇緝鏀劇殑蹇熺畻娉?amp;PSD鏍煎紡鐨勫紑鍙?amp;PSD鏍煎紡鏂囦歡鐨勮鍙?/span></b>聽聽聽聽 閫夋嫨鑷?<a id="ArticleTitle1_ArticleTitle1_AuthorLink" >byxdaz</a> 鐨?Blog </td> </tr> <tr> <td align="center" bgcolor="#003399" height="16"> <font color="#ffffff">鍏抽敭瀛?/font> </td> <td width="500">聽 <span id="ArticleTitle1_ArticleTitle1_lblKeywords">涓縐嶄綅鍥劇緝鏀劇殑蹇熺畻娉?amp;PSD鏍煎紡鐨勫紑鍙?amp;PSD鏍煎紡鏂囦歡鐨勮鍙?/span></td> </tr> <tr> <td align="center" bgcolor="#003399" height="16"> <font color="#ffffff">鍑哄</font> </td> <td>聽 <span id="ArticleTitle1_ArticleTitle1_lblSource"></span></td> </tr> </tbody> </table> </td> </tr> <tr> <td width="10"> <br /> </td> <td> <span id="ArticleContent1_ArticleContent1_lblContent"> <p>涓縐嶄綅鍥劇緝鏀劇殑蹇熺畻娉?amp;PSD鏍煎紡鐨勫紑鍙?amp;PSD鏍煎紡鏂囦歡鐨勮鍙?/p> <p>涓縐嶄綅鍥劇緝鏀劇殑蹇熺畻娉暵?img src="E:%5CBaseInfoImage.bmp" /><br /><br />銆銆緇欏畾涓涓綅鍥撅紝濡備綍灝嗗畠緙╂斁鑷充換鎰忓昂瀵革紵寰堟槑鏄撅紝鍞竴鐨勬柟娉曟槸錛氭斁澶ф椂錛屽湪鍍忕礌涓棿娣誨姞涓浜涢噸澶嶅儚 绱狅紝浣垮浘鍍忔媺瀹斤紱緙╁皬鏃訛紝鎶婇儴鍒嗗儚绱犲垹闄ゆ帀錛屼嬌鍥懼儚鏀剁緝銆備絾鏄浣曠‘瀹氬摢浜涘儚绱犺閲嶅錛屽摢浜涘儚绱犺鍒犻櫎鍛紵涓嬮潰鐨勬柟娉曟槸鎴戣嚜宸叉兂鐨勶紝濡傛灉浣犳湁鏇村ソ鐨勬柟娉曪紝 璇峰憡璇夋垜銆傛垜浠彧鑰冭檻姘村鉤鏂瑰悜錛堝瀭鐩存柟鍚戣窡姘村鉤鏂瑰悜鏄悓鏍風(fēng)殑閬撶悊錛夈備笅闈㈠厛浠庣畝鍗曠殑渚嬪瓙鏉ヨ錛屾渶鍚庡啀鎺ㄥ嚭涓涓氱敤鐨勭畻娉曪細(xì)<br /><br />鑻ヨ鏀懼ぇ1鍊嶏紝搴斿皢姣忎竴涓儚绱犻兘閲嶅涓嬈★紝N涓儚绱犲彉鎴愪簡(jiǎn)2N涓儚绱狅紝鍥懼儚鏀懼ぇ涓?鍊嶃傝繖涓笉闅撅紱<br /><br />鑻ヨ緙╁皬1/2錛屽簲璇ユ瘡闅斾竴涓儚绱犲垹闄や竴涓儚绱狅紝2N涓儚绱犲彉鎴愪簡(jiǎn)N涓儚绱狅紝鍥懼儚緙╁皬涓鍗娿傝繖涓篃涓嶉毦錛?br /><br />鑻ヨ鏀懼ぇ1.5鍊嶏紝鎬庝箞鍔烇紵鍋囪鍘熸湁2N涓儚绱狅紝鐜板湪嬈插彉鎴?N涓儚绱狅紝欏繪坊鍔燦涓儚绱狅紝鎵浠ュ簲瀵瑰師鍥炬瘡闅斾竴涓儚绱犳坊鍔犱竴涓噸澶嶅儚绱狅細(xì)聽<br /><br />鑻ヨ緙╁皬1/3錛屽氨鏄疌鐨勯嗚繃紼嬶細(xì)姣忛殧涓や釜鍍忕礌鍒犻櫎涓涓儚绱犮偮?br />銆 銆涓婇潰鍥涗釜渚嬪瓙閮芥槸姣旇緝瀹規(guī)槗鐨勭壒渚嬨傜幇鍦ㄦ潵鑰冭檻閫氱敤鐨勭畻娉曘傚湪鍥涗釜渚嬪瓙鐨勭緝鏀捐繃紼嬪彲浠ヨ繖鏍風(fēng)悊瑙c傚亣璁炬灝嗛暱搴︿負(fù)N1鐨勫儚绱犲垪鍙樻垚闀垮害涓篘2鐨勫儚绱犲垪錛岄 鍏堬紝璁劇珛涓や釜鎸囬拡錛屼竴涓綔涓烘簮鎸囬拡錛屾寚鍚戝師鏉ョ殑鍍忕礌鍒楋紝璇誨彇婧愬儚绱狅紝鍙︿竴涓綔涓虹洰鐨勬寚閽堬紝鎸囧悜鍙樻崲鍚庣殑鍍忕礌鍒楋紝鍐欏叆璇誨彇鍒扮殑鍍忕礌銆傜劧鍚庯紝浠ユ媺浼稿悗鍍忕礌鍒楃殑 闀垮害涓哄驚鐜鏁幫紝寰幆N2嬈★紝姣忔寰幆涓敱婧愭寚閽堝COPY涓涓儚绱犲埌鐩殑鎸囬拡澶勶紝鐒跺悗鐩殑鎸囬拡鍔犱竴錛屾簮鎸囬拡鏍規(guī)嵁姣忔寰幆鐨勪笉鍚岄渶瑕佸鍔犱竴瀹氭闀匡紙鏀懼ぇ鏃? 姝ラ暱鏄浂鎴栦竴錛岀緝?yōu)畯鏃舵闀垮ぇ浜幗{変簬涓錛夈?br />銆銆綆楁硶鐨勬鏋惰В鍐充簡(jiǎn)錛屼絾鏄腑蹇?jī)鍐呭浠嶆病鏈夎В鍐冲Q氬浣曠‘瀹氭瘡嬈″驚鐜噷婧愭寚閽堝鍔犵殑姝ラ暱錛熸垨鑰呰錛屾瘡嬈″驚鐜? 閲屽浣曟洿鏂版簮鎸囬拡鐨勪綅緗紵瀹規(guī)槗鐪嬪嚭錛岄氳繃嫻偣榪愮畻寰堝鏄撹В鍐寵繖涓棶棰橈細(xì)璁劇珛涓涓垵鍊間負(fù)闆剁殑嫻偣鍙橀噺錛屾瘡嬈″驚鐜腑錛屾妸榪欎釜嫻偣鍙橀噺鍔犱笂N1/N2錛屽茍灝嗗叾緇? 鏋滅殑鏁存暟閮ㄥ垎浣滀負(fù)婧愭寚閽堣窛紱昏搗濮嬩綅緗殑鍋忕Щ閲忥紱榪欐牱錛岀粡榪嘚2嬈″驚鐜紝嫻偣鍙橀噺鐨勫兼伆濂借揪鍒癗1錛屾簮鎸囬拡涔熸伆濂解滆蛋鈥濆埌鍘熷儚绱犲垪鐨勬湯灝俱?br />銆銆榪欎釜 鏂規(guī)硶鍙錛屼絾鏄お鎱€傚鏋滆兘灝嗘誕鐐硅繍綆楄漿鍖栨垚鏁存暟榪愮畻灝卞揩澶氫簡(jiǎn)銆傞偅涔堝浣曡漿鍖栧憿錛熸垜浠彲浠ヨ绔嬩竴涓煎煙涓篘1*N2鐨勬暣鏁拌鏁板櫒錛屾瘡嬈″驚鐜掑N1錛屽茍涓? 瑙勫畾錛岃鏁板櫒姣忓鍔燦2錛屾簮鎸囬拡灝卞墠榪涗竴涓儚绱犮傝繖鏍鳳紝緇忚繃N2嬈″驚鐜紝璁℃暟鍣ㄥ叡澧炲姞浜?jiǎn)N1*N2錛屾簮鎸囬拡鍒欏鍔犱簡(jiǎn)N1涓崟鍏冿紝鎭板ソ鈥滆蛋鈥濆畬鍏ㄧ▼銆傚疄闄呯紪 紼嬩腑錛屾垜浠槸鐢ㄤ竴涓煎煙涓篘2鐨勬暣鏁拌鏁板櫒錛岃秴鍑哄煎煙閮ㄥ垎鍙栨ā澶勭悊銆傜畻娉曞ぇ鑷村涓嬶細(xì)<br /><br />銆銆void聽StrechPixels(int聽N1,聽int聽N2,聽PIXEL聽src_pixels[],聽PIXEL聽dest_pixels[])<br />銆銆{<br />銆銆銆銆ASSERT(N1聽<=聽N2);銆銆//聽N1聽must聽<=聽N2<br />銆銆銆銆int聽p1聽=聽0,聽count聽=聽0;<br />銆銆銆銆for聽(int聽p2聽=聽0;聽p2聽<聽N2;聽p2++)<br />銆銆銆銆{<br />銆銆銆銆銆銆dest_pixels[p2]聽=聽src_pixels[p1];<br />銆銆銆銆銆銆count聽+=聽N1;<br />銆銆銆銆銆銆while聽(count聽>=聽N2)<br />銆銆銆銆銆銆{<br />銆銆銆銆銆銆銆銆count聽-=聽N2;<br />銆銆銆銆銆銆銆銆p1++;<br />銆銆銆銆銆銆}<br />銆銆銆銆}<br />銆銆}<br /><br />銆 銆涓婇潰綆楁硶鍙槸姘村鉤緙╂斁鍗曡鍍忕礌錛屽鍨傜洿鏂瑰悜涔熼噰鐢ㄥ悓鏍風(fēng)殑綆楁硶錛屼究瀹炵幇浜?jiǎn)鋼Q鎰忔瘮渚嬬殑浣嶅浘緙╂斁銆傜粡榪囦互涓婄畻娉曠殑澶勭悊錛屾斁澶ф椂鍥懼儚鍑虹幇椹禌鍏嬶紝緙╁皬鏃跺浘鍍忓嚭鐜? 闂牼銆傝嫢瑕佽幏寰楅珮璐ㄩ噺鐨勭緝鏀懼浘褰紝欏婚噰鐢ㄦ彃鍊箋佽繃婊ょ瓑鎶鏈備絾鏄洜涓鴻繖浜涙妧鏈墍闇璁$畻閲忓お澶э紝鍦ㄦ父鎴忎腑閫氬父闈犵‖浠跺姞閫熸潵瀹炵幇錛屼笉瀹滆蔣浠惰В鍐熾偮犅?br /><br /><br />================================================================<br />PSD鏍煎紡鐨勫紑鍙懧?br /><br /><br /><br />銆 銆鎴戝湪鍋氭父鎴忔椂錛屽洜涓鴻鐢ㄥ埌灝哖SD鏍煎紡杞崲鎴怋MP鎴栬匤PG鏍煎紡鐨勭▼搴忥紝鑰屼笖錛屽湪杞崲鏃訛紝瑕佸皢PSD涓殑絀烘牸杞垚娓告垙涓害瀹氱殑閫忔槑鑹詫紝榪欐牱鐨勭▼搴忥紝鍙? 鑳借嚜宸卞幓鍐欎簡(jiǎn)銆傛墍浠ワ紝鎴戝湪緗戜笂鎼滀簡(jiǎn)涓闃靛瓙錛屾壘鍒頒簡(jiǎn)鈥滀腑鍥芥父鎴忓紑鍙戣呪濈殑緗戠珯錛岀湅鍒頒簡(jiǎn)涓綃囧叧浜嶱SD鏍煎紡鐨勬枃绔狅紙榪欎篃鏄垜寮濮嬪悜榪欎釜緗戠珯鎶曠ǹ鐨勫師鍥狅紝涔熻榪? 灝卞彨緙橈級(jí)銆?br />銆銆鏈潵鏄兂鍋風(fēng)偣鎳掞紝鐪佸幓浜?jiǎn)鑷忿q爺絀朵箣鑻︼紝鍙互鎶勪竴鎶勫埆浜虹幇鍦ㄧ殑浠g爜錛屽啀鑷繁鏀規(guī)敼錛屽張鑳界渷鏃墮棿錛屽張鑳藉鍒頒笢瑗匡紝浣曚箰鑰屼笉涓哄憿錛熷彲鏄紝鍦? 鎶勪笅榪欑瘒鏂囩珷鐨勪唬鐮佷箣鍚庯紝鍙戠幇鍏惰繍琛屽眳鐒舵槸涓嶈兘閫氳繃鐨勩傜湅鏉ュぉ涓嬫病鏈夊厤璐圭殑鍗堥錛屾垜榪樻槸寰楄嚜宸辯爺絀躲備竴涓灝忔椂鐨勮嫤鎴樹箣鍚庯紝緇堜簬鍙戠幇浜?jiǎn)闂鎵鍦紝涔熻榪欏茍 涓嶆槸涓涓棶棰橈紝鍙槸瀵逛簬娌℃湁榪欎釜緇忛獙浜烘潵璇達(dá)紝榪欑‘瀹炴槸涓ぇ闂銆傛垜鐜板湪灝嗚繖綃囨枃绔犵殑涓浜涘湴鏂硅繘琛屾敼姝o紝鏈涘悇浣嶆湅鍙嬪湪寮鍙慞SD鏍煎紡鐨勮鍙栭棶棰樹笂錛屼笉鍐嶆湁楹? 鐑?chǔ)銆傚師鏂囥奝SD鏍煎紡鏂囦歡鐨勮鍙栥嬪湪榪欓噷http: //cgd.pages.com.cn/cgd/develop/effect/200109/ReadPSD.htm錛屽悇浣嶅彲浠ョ湅鐪嬨傛垜鍙皢鎴戠殑鏀規(guī)閮? 鍒嗗啓鍦ㄤ笅闈細(xì)聽<br /><br />銆銆1錛夋枃浠跺ご鏄?涓瓧鑺傦紝鍙兘璇?涓瓧鑺傘?br />銆銆2錛塒hotoshop鐨凱SD鏍煎紡鐢ㄧ殑鏄疞IT鏍煎紡瀛樺偍銆?br /><br />銆 銆榪欎釜LIT鏍煎紡鎴戜互鍓嶅彧鏄惉璇磋繃錛屾病鎯沖埌浼?xì)琚玃SD鐢ㄤ笂銆傝繖涓牸寮忔槸灝嗘暟鎹殑楂樹綆浣嶇爜浜ゆ崲浜?jiǎn)鐨勫Q屽鏋滅洿鎺ョ敤ReadFile鎴栬協(xié)read鍑芥暟灝嗗叾璇誨嚭 鏉ワ紝瀹冪殑楂樹綆浣嶇爜鏄浜ゆ崲浜?jiǎn)鐨勩備緥濡傦細(xì)640鐨?6榪涘埗鍊兼槸1E0錛岀敤DWORD鏂瑰紡瀛樺湪紜洏閲屾槸0001E000錛岀敤璇繪枃浠剁殑鍑芥暟璇誨嚭鏉ヤ互鍚庯紝灝嗗彉鎴愶細(xì) 00E00100銆傛墍浠ワ紝鍏墮珮浣庝綅鐮佽浜ゆ崲浜?jiǎn)锛岃В鍐崇殑鏂规硶鏄敤铦{鎹㈠嚱鏁幫紝浠g爜濡備笅錛?br /><br />銆銆WORD聽WORDBIGtoLIT(WORD聽code)銆//聽瀛楀瀷鐨勫鐞?br />銆銆{<br />銆銆銆銆return聽((a聽>>聽8聽&聽0xFF)聽|聽((a聽&聽0x00FF)聽<<聽8);銆//聽鎶婇珮浣庝綅鐮佸啀浜ゆ崲榪囨潵<br />銆銆}<br /><br />銆銆DWORD聽DWORDBIGtoLIT(DWORD聽code)銆//聽鍙屽瓧鍨嬬殑澶勭悊<br />銆銆{<br />銆銆銆銆WORD聽HiCode,聽LowCode;<br /><br />銆銆銆銆HiCode聽=聽code聽&聽0xFFFF0000;<br />銆銆銆銆LowCode聽=聽code聽&聽0x0000FFFF;<br />銆銆銆銆HiCode聽=聽((HiCode聽>>聽8)聽&聽0xFF)聽|聽((HiCode聽&聽0x00FF)聽<<聽8);<br />銆銆銆銆LowCode聽((LowCode聽>>聽8)聽&聽0xFF)聽|聽((LowCode聽&聽0x00FF)聽<<聽8);<br />銆銆銆銆return聽MAKELONG((WORD)(LowCode聽<<聽16),聽(WORD)HiCode);<br />銆銆}<br /><br />銆銆褰撶劧錛屼篃鍙互瀹氫箟鎴愬畯褰㈠紡錛屽涓嬶細(xì)<br /><br />銆銆#define聽BIG2LIT(a)聽(WORD((a聽>>聽8聽&聽0xFF)聽|聽((a聽&聽0x00FF)聽<<聽8)))<br />銆銆#define聽DWORDBIG2LIT(b)聽MAKELONG(BIG2LIT(HIWORD(b)),聽BIG2LIT(LOWORD(b)))<br /><br />銆銆鐪嬭搗鏉ョ畝鍗曚竴浜涳紝鍝堝搱鈥︹︺傚叾瀹冪殑錛屽師鏂囨病鏈変粈涔堥敊璇紝涓嶈繃錛屾垜寤鴻澶у榪樻槸鏈濂借嚜宸卞幓瑙e喅闂錛屽懙鍛碉紝鍥犱負(fù)鏈変竴鍙ヨ瘽璇村緱寰堝ソ錛氳佸笀鑳芥暀浣犺涔﹀啓瀛楋紝浣嗘槸涓嶈兘鏁欎綘鍋氬ぉ涓嬫枃绔犮偮?br /><br /><br />================================================================<br />PSD鏍煎紡鏂囦歡鐨勮鍙柭?br /><br /><br />銆 銆PhotoShop錛屾垜鎯蟲病鏈変漢浼?xì)涓嶇煡閬撳惂銆傚浠婃渶鏂扮殑鐗堟湰鏄?.0錛屽叾鍥捐薄鏂囦歡*.PSD鍜?.5鐩告瘮鍙樺寲騫朵笉澶ぇ銆備互涓嬫垜灝變粙緇?.PSD鏂囦歡鐨勮 鍙栨柟娉曪紝騫舵彁渚涘畬鏁磋鍙栧嚱鏁般傚叾涓細(xì)m_Rect涓虹洰鏍囧尯鍩燂紝m_lpDDS7涓虹洰鏍嘍irectDraw琛ㄩ潰錛宮_pbAlphaMask涓虹洰鏍? Aplha閫氬憡鎸囬拡銆俁ead16鍑芥暟涓轟粠鎸囧畾鏂囦歡褰撳墠浣嶇疆璇誨彇涓涓猈ORD錛孯ead32鍑芥暟涓轟粠鎸囧畾鏂囦歡褰撳墠浣嶇疆璇誨彇涓涓狣WORD銆? MAX_PSD_CHANNELS涓?4銆備互涓嬪氨鏄?.PSD鏂囦歡鐨勮鍙栨柟娉曪紝鏈夊叴瓚g殑鏈嬪弸鍙互緇х畫娣卞叆鐮旂┒錛屽埌鏃跺彲鍒繕浜?jiǎn)鍙戞垜涓浠姐?br /><br />銆銆HRESULT聽LoadPSD(聽LPSTR聽strFilename聽)聽//聽璇誨彇PSD鏂囦歡<br />銆銆{<br />銆銆銆銆DWORD聽dwWidth,聽dwHeight;聽//聽瀹介珮<br />銆銆銆銆long聽lSurfWidth聽=聽m_Rect.right聽-聽m_Rect.left;<br />銆銆銆銆long聽lSurfHeight聽=聽m_Rect.bottom聽-聽m_Rect.top;<br />銆銆銆銆WORD聽CompressionType;聽//聽鍘嬬緝綾誨瀷<br />銆銆銆銆HDC聽hDC;<br />銆銆銆銆FILE聽*fpPSD;<br />銆銆銆銆WORD聽ChannelCount;聽//聽閫氶亾鏁?br /><br />銆銆銆銆//聽鎵撳紑PSD鏂囦歡<br />銆銆銆銆if聽(聽(聽fpPSD聽=聽fopen聽(聽strFilename,聽"rb"聽)聽)聽==聽NULL聽)聽{<br />銆銆銆銆銆銆return聽E_FAIL;<br />銆銆銆銆}<br /><br />銆銆銆銆//聽澶村洓涓瓧鑺備負(fù)"8BPS"<br />銆銆銆銆char聽signature[5];<br />銆銆銆銆signature[0]聽=聽fgetc(聽fpPSD聽);<br />銆銆銆銆signature[1]聽=聽fgetc(聽fpPSD聽);<br />銆銆銆銆signature[2]聽=聽fgetc(聽fpPSD聽);<br />銆銆銆銆signature[3]聽=聽fgetc(聽fpPSD聽);<br />銆銆銆銆signature[4]聽=聽'\0';<br />銆銆銆銆if聽(聽strcmp(聽signature,"8BPS"聽)聽!=聽0聽)聽{<br />銆銆銆銆銆銆return聽E_FAIL;<br />銆銆銆銆}<br /><br />銆銆銆銆//聽鐗堟湰蹇呴』涓?<br />銆銆銆銆if聽(聽Read16(聽fpPSD聽)聽!=聽1聽)聽{<br />銆銆銆銆銆銆return聽E_FAIL;<br />銆銆銆銆}<br /><br />銆銆銆銆//聽璺寵繃涓浜涙暟鎹?鎬繪槸0)<br />銆銆銆銆Read32(聽fpPSD聽);<br />銆銆銆銆Read16(聽fpPSD聽);<br /><br />銆銆銆銆//聽璇誨彇閫氶亾鏁?br />銆銆銆銆ChannelCount聽=聽Read16(聽fpPSD聽);<br /><br />銆銆銆銆//聽紜畾鑷沖皯鏈変竴涓氶亾<br />銆銆銆銆if聽(聽(聽ChannelCount聽<聽0聽)聽||聽(聽ChannelCount聽>聽MAX_PSD_CHANNELS聽)聽)聽{<br />銆銆銆銆銆銆return聽E_FAIL;<br />銆銆銆銆}<br /><br />銆銆銆銆//聽璇誨叆瀹藉拰楂?br />銆銆銆銆dwHeight聽=聽Read32(聽fpPSD聽);<br />銆銆銆銆dwWidth聽=聽Read32(聽fpPSD聽);<br />銆銆銆銆if聽(聽dwWidth聽!=聽(聽DWORD聽)lSurfWidth聽||聽dwHeight聽!=聽(聽DWORD聽)lSurfHeight聽)聽{<br />銆銆銆銆銆銆return聽E_FAIL;<br />銆銆銆銆}<br /><br />銆銆銆銆//聽鍙鍏?浣嶉氶亾<br />銆銆銆銆if聽(聽Read16(聽fpPSD聽)聽!=聽8聽)聽{<br />銆銆銆銆銆銆return聽E_FAIL;<br />銆銆銆銆}<br /><br />銆銆銆銆//聽紜畾妯″紡涓篟GB.<br />銆銆銆銆//聽鍙兘鍊鹼細(xì)<br />銆銆銆銆//聽0:聽浣嶅浘<br />銆銆銆銆//聽1:聽鐏伴樁<br />銆銆銆銆//聽2:聽绱㈠紩<br />銆銆銆銆//聽3:聽RGB<br />銆銆銆銆//聽4:聽CMYK<br />銆銆銆銆//聽7:聽Multichannel<br />銆銆銆銆//聽8:聽Duotone<br />銆銆銆銆//聽9:聽Lab<br />銆銆銆銆if聽(聽Read16(聽fpPSD聽)聽!=聽3聽)聽{<br />銆銆銆銆銆銆return聽E_FAIL;<br />銆銆銆銆}<br /><br />銆銆銆銆//聽璺寵繃鏁版嵁錛堝璋冭壊鏉匡級(jí)<br />銆銆銆銆int聽ModeDataCount聽=聽Read32(聽fpPSD聽);<br />銆銆銆銆if聽(聽ModeDataCount聽)<br />銆銆銆銆銆銆fseek(聽fpPSD,聽ModeDataCount,聽SEEK_CUR聽);<br /><br />銆銆銆銆//聽璺寵繃鏁版嵁錛堝錛歱en聽tool聽paths,聽etc錛?br />銆銆銆銆int聽ResourceDataCount聽=聽Read32(聽fpPSD聽);<br />銆銆銆銆if聽(聽ResourceDataCount聽)<br />銆銆銆銆銆銆fseek(聽fpPSD,聽ResourceDataCount,聽SEEK_CUR聽);<br /><br />銆銆銆銆//聽鏉¤繃淇濈暀鏁版嵁<br />銆銆銆銆int聽ReservedDataCount聽=聽Read32(聽fpPSD聽);<br />銆銆銆銆if聽(聽ReservedDataCount聽)<br />銆銆銆銆銆銆fseek(聽fpPSD,聽ReservedDataCount,聽SEEK_CUR聽);<br /><br />銆銆銆銆//聽0:聽闈炲帇緙?br />銆銆銆銆//聽1:聽RLE鍘嬬緝<br />銆銆銆銆CompressionType聽=聽Read16(聽fpPSD聽);<br />銆銆銆銆if聽(聽CompressionType聽>聽1聽)聽{<br />銆銆銆銆銆銆return聽E_FAIL;<br />銆銆銆銆}<br /><br />銆銆銆銆BYTE*聽PSDPixels聽=聽new聽BYTE[聽(聽lSurfWidth聽*聽lSurfHeight聽)聽*聽4聽];<br /><br />銆銆銆銆//聽瑙e寘鏁版嵁<br />銆銆銆銆UnPackPSD(聽fpPSD,聽lSurfWidth,聽lSurfHeight,聽PSDPixels,聽ChannelCount,聽CompressionType聽);<br /><br />銆銆銆銆fclose(聽fpPSD聽);<br /><br />銆銆銆銆//聽澶嶅埗淇℃伅<br />銆銆銆銆BITMAPINFO聽BitmapInfo;<br />銆銆銆銆ZeroMemory(聽&BitmapInfo,聽sizeof(聽BitmapInfo聽)聽);<br />銆銆銆銆BitmapInfo.bmiHeader.biSize聽=聽sizeof(聽BitmapInfo.bmiHeader聽);<br />銆銆銆銆BitmapInfo.bmiHeader.biWidth聽=聽lSurfWidth;<br />銆銆銆銆BitmapInfo.bmiHeader.biHeight聽=聽-lSurfHeight;<br />銆銆銆銆BitmapInfo.bmiHeader.biPlanes聽=聽1;<br />銆銆銆銆BitmapInfo.bmiHeader.biBitCount聽=聽32;<br /><br />銆銆銆銆m_lpDDS7->GetDC(聽&hDC聽);<br /><br />銆銆銆銆int聽rc聽=聽StretchDIBits(聽hDC,<br />銆銆銆銆銆銆銆銆銆銆銆銆銆銆銆銆0,<br />銆銆銆銆銆銆銆銆銆銆銆銆銆銆銆銆0,<br />銆銆銆銆銆銆銆銆銆銆銆銆銆銆銆銆lSurfWidth,<br />銆銆銆銆銆銆銆銆銆銆銆銆銆銆銆銆lSurfHeight,<br />銆銆銆銆銆銆銆銆銆銆銆銆銆銆銆銆0,<br />銆銆銆銆銆銆銆銆銆銆銆銆銆銆銆銆0,<br />銆銆銆銆銆銆銆銆銆銆銆銆銆銆銆銆lSurfWidth,<br />銆銆銆銆銆銆銆銆銆銆銆銆銆銆銆銆lSurfHeight,<br />銆銆銆銆銆銆銆銆銆銆銆銆銆銆銆銆PSDPixels,<br />銆銆銆銆銆銆銆銆銆銆銆銆銆銆銆銆&BitmapInfo,<br />銆銆銆銆銆銆銆銆銆銆銆銆銆銆銆銆DIB_RGB_COLORS,<br />銆銆銆銆銆銆銆銆銆銆銆銆銆銆銆銆SRCCOPY聽);<br /><br />銆銆銆銆m_lpDDS7->ReleaseDC(聽hDC聽);<br /><br />銆銆銆銆if聽(聽rc聽==聽GDI_ERROR聽)聽{<br />銆銆銆銆銆銆H_ARRAY_DELETE(聽PSDPixels聽);<br /><br />銆銆#ifdef聽_DEBUG<br />銆銆銆銆g_pHERR->OutDebugMsg(聽3,聽H2DSERR_INVALID_PSD聽);<br />銆銆#endif<br />銆銆銆銆return聽E_FAIL;<br /><br />銆銆銆銆}<br /><br />銆銆銆銆//聽鏄惁璇誨彇Alpha娣峰悎閫氶亾<br />銆銆銆銆if(聽ChannelCount聽>聽3聽)聽{<br />銆銆銆銆銆銆m_pbAlphaMask聽=聽new聽BYTE[聽lSurfWidth聽*聽lSurfHeight聽];<br /><br />銆銆銆銆for聽(聽int聽x聽=聽0;聽x聽<聽lSurfWidth;聽x++聽)<br />銆銆銆銆銆銆for聽(聽int聽y聽=聽0;聽y聽<聽lSurfHeight;聽y++聽)聽{<br />銆銆銆銆銆銆銆銆m_pbAlphaMask[聽(聽y聽*聽lSurfWidth聽)聽+聽x聽]聽=<br />銆銆銆銆銆銆銆銆銆銆銆銆銆銆聽銆PSDPixels[聽(聽(聽(聽y聽*聽lSurfHeight聽)聽+聽x聽)聽*聽4聽)聽+聽3聽];<br />銆銆銆銆銆銆}<br />銆銆銆銆}<br />銆銆銆銆else聽{<br />銆銆銆銆銆銆m_pbAlphaMask聽=聽NULL;<br />銆銆銆銆}<br /><br />銆銆銆銆H_ARRAY_DELETE(聽PSDPixels聽);<br /><br />銆銆銆銆return聽DD_OK;<br />銆銆}<br /><br />銆銆//聽PSD鏂囦歡瑙e寘<br /><br />銆銆void聽CHades2DSurface::UnPackPSD(聽FILE聽*fp,銆銆銆銆銆//聽fp涓篜SD鏂囦歡鎸囬拡錛?br />銆銆銆銆銆銆銆銆銆銆銆銆銆銆銆銆銆銆聽DWORD聽dwWidth,銆銆聽//聽dwWidth銆乨wHeight涓哄楂橈紝<br />銆銆銆銆銆銆銆銆銆銆銆銆銆銆銆銆銆銆聽DWORD聽dwHeight,<br />銆銆銆銆銆銆銆銆銆銆銆銆銆銆銆銆銆銆聽BYTE*聽pixels,銆銆銆//聽pixels涓鴻В鍖呯洰鏍囨寚閽堬紝<br />銆銆銆銆銆銆銆銆銆銆銆銆銆銆銆銆銆銆聽WORD聽ChannelCnt,銆聽//聽ChannelCnt涓洪氶亾鏁幫紝<br />銆銆銆銆銆銆銆銆銆銆銆銆銆銆銆銆銆銆聽WORD聽Compression聽)聽//聽Compression浣嶅帇緙╃被鍨嬨偮?br />銆銆銆銆銆銆銆銆銆銆銆銆銆銆銆銆<br />銆銆銆銆銆銆銆銆銆銆銆銆銆銆銆銆聽<br />銆銆{<br />銆銆銆銆int聽Default[4]聽=聽{聽0,聽0,聽0,聽255聽};<br />銆銆銆銆int聽chn[4]聽=聽{聽2,聽1,聽0,聽3};<br />銆銆銆銆int聽PixelCount聽=聽dwWidth聽*聽dwHeight;<br /><br />銆銆銆銆if聽(聽Compression聽)聽{<br />銆銆銆銆銆銆fseek(聽fp,聽dwHeight聽*聽ChannelCnt聽*聽2,聽SEEK_CUR聽);<br /><br />銆銆銆銆銆銆for聽(聽int聽c聽=聽0;聽c聽<聽4;聽c++聽)聽{<br />銆銆銆銆銆銆銆銆int聽pn聽=聽0;<br />銆銆銆銆銆銆銆銆int聽channel聽=聽chn[c];<br /><br />銆銆銆銆銆銆銆銆if聽(聽channel聽>=聽ChannelCnt聽)聽{<br />銆銆銆銆銆銆銆銆銆銆for聽(聽pn=0;聽pn聽<聽PixelCount聽;pn++聽)聽{<br />銆銆銆銆銆銆銆銆銆銆銆銆pixels[聽(聽pn聽*聽4聽)聽+聽channel聽]聽=聽Default[聽channel聽];<br />銆銆銆銆銆銆銆銆銆銆}<br />銆銆銆銆銆銆銆銆}<br />銆銆銆銆銆銆銆銆else聽//聽闈炲帇緙?br />銆銆銆銆銆銆銆銆{<br />銆銆銆銆銆銆銆銆銆銆int聽count聽=聽0;<br />銆銆銆銆銆銆銆銆銆銆while(聽count聽<聽PixelCount聽)聽{<br />銆銆銆銆銆銆銆銆銆銆銆銆int聽len聽=聽fgetc(聽fp聽);<br />銆銆銆銆銆銆銆銆銆銆銆銆if(聽len聽==聽128聽)聽{聽}<br />銆銆銆銆銆銆銆銆銆銆銆銆else聽if聽(聽len聽<聽128聽)聽//聽闈濺LE<br />銆銆銆銆銆銆銆銆銆銆銆銆{<br />銆銆銆銆銆銆銆銆銆銆銆銆銆銆len++;<br />銆銆銆銆銆銆銆銆銆銆銆銆銆銆count聽+=聽len;<br />銆銆銆銆銆銆銆銆銆銆銆銆銆銆while(len)聽{<br />銆銆銆銆銆銆銆銆銆銆銆銆銆銆銆銆pixels[聽(聽pn聽*聽4聽)聽+聽channel聽]聽=聽fgetc(聽fp聽);<br />銆銆銆銆銆銆銆銆銆銆銆銆銆銆銆銆pn++;<br />銆銆銆銆銆銆銆銆銆銆銆銆銆銆銆銆len--;<br />銆銆銆銆銆銆銆銆銆銆銆銆銆銆}<br />銆銆銆銆銆銆銆銆銆銆銆銆}<br />銆銆銆聽銆銆銆銆銆銆銆銆聽else聽if聽(聽len聽>聽128聽)聽//聽RLE鎵撳寘<br />銆銆銆銆銆銆銆銆銆銆銆銆{<br />銆銆銆銆銆銆銆銆銆銆銆銆銆銆len聽^=聽0x0FF;<br />銆銆銆銆銆銆銆銆銆銆銆銆銆銆len聽+=聽2;<br />銆銆銆銆銆銆銆銆銆銆銆銆銆銆unsigned聽char聽val聽=聽fgetc(聽fp聽);<br />銆銆銆銆銆銆銆銆銆銆銆銆銆銆count聽+=聽len;<br />銆銆銆銆銆銆銆銆銆銆銆銆銆銆while(聽len聽)聽{<br />銆銆銆銆銆銆銆銆銆銆銆銆銆銆銆銆pixels[聽(聽pn聽*聽4聽)聽+聽channel聽]聽=聽val;<br />銆銆銆銆銆銆銆銆銆銆銆銆銆銆銆銆pn++;<br />銆銆銆銆銆銆銆銆銆銆銆銆銆銆銆銆len--;<br />銆銆銆銆銆銆銆銆銆銆銆銆銆銆}<br />銆銆銆銆銆銆銆銆銆銆銆銆}<br />銆銆銆銆銆銆銆銆銆銆}<br />銆銆銆銆銆銆銆銆}<br />銆銆銆銆銆銆}<br />銆銆銆銆}<br />銆銆銆銆else<br />銆銆銆銆{<br />銆銆銆銆銆銆for聽(聽int聽c=0;聽c聽<聽4;聽c++聽)聽{<br />銆銆銆銆銆銆銆銆int聽channel聽=聽chn[c];<br />銆銆銆銆銆銆銆銆if聽(聽channel聽>聽ChannelCnt聽)聽{<br />銆銆銆銆銆銆銆銆銆銆for(聽int聽pn聽=聽0;聽pn聽<聽PixelCount;聽pn++聽)聽{<br />銆銆銆銆銆銆銆銆銆銆銆銆pixels[聽(聽pn聽*聽4聽)聽+聽channel聽]聽=聽Default[聽channel聽];<br />銆銆銆銆銆銆銆銆銆銆}<br />銆銆銆銆銆銆銆銆}<br />銆銆銆銆銆銆銆銆else聽{<br />銆銆銆銆銆銆銆銆銆銆for(聽int聽n聽=聽0;聽n聽<聽PixelCount;聽n++聽)聽{<br />銆銆銆銆銆銆銆銆銆銆銆銆pixels[聽(聽n聽*聽4聽)聽+聽channel聽]聽=聽fgetc(聽fp聽);<br />銆銆銆銆銆銆銆銆銆銆}<br />銆銆銆銆銆銆銆銆}<br />銆銆銆銆銆銆}<br />銆銆銆銆}<br />銆銆}聽聽</p> </span> </td> </tr> </tbody> </table> <img src ="http://m.shnenglu.com/swo2006/aggbug/11279.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.shnenglu.com/swo2006/" target="_blank">swo</a> 2006-08-16 10:42 <a href="http://m.shnenglu.com/swo2006/articles/11279.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>浣跨敤GDI+鍦ㄥ唴瀛樹腑杞崲鍥劇墖綾誨瀷 [杞澆]http://m.shnenglu.com/swo2006/articles/11004.htmlswoswoTue, 08 Aug 2006 09:02:00 GMThttp://m.shnenglu.com/swo2006/articles/11004.htmlhttp://m.shnenglu.com/swo2006/comments/11004.htmlhttp://m.shnenglu.com/swo2006/articles/11004.html#Feedback0http://m.shnenglu.com/swo2006/comments/commentRss/11004.htmlhttp://m.shnenglu.com/swo2006/services/trackbacks/11004.html 浣跨敤GDI+鍦ㄥ唴瀛樹腑杞崲鍥劇墖綾誨瀷 [杞澆]


銆銆棣栧厛錛屽湪StdAfx.h涓潤(rùn)鎬佽皟鐢╠iplus.lib錛屽嵆鐢辯紪璇戠郴緇熷畬鎴愬DLL鐨勫姞杞斤紝搴旂敤紼嬪簭緇撴潫鏃跺嵏杞紻LL鐨勭紪鐮併傚涓嬶細(xì)

#ifndef ULONG_PTR
#define ULONG_PTR unsigned long*
#include "GdiPlus.h"
using namespace Gdiplus;
#pragma comment(lib, "gdiplus.lib")
#endif
鍦ㄧ被鐨勫ご鏂囦歡涓畾涔夛紝浠ヤ笅鎴愬憳鍙橀噺錛岀敤鏉ュ垵濮嬪寲GDI+鐨勪嬌鐢ㄥ拰緇撴潫浣跨敤銆?
GdiplusStartupInput m_gdiplusStartupInput; 
ULONG_PTR m_gdiplusToken;
鐒跺悗鍦∣nCreate()鍑芥暟涓姞鍏ュ垵濮嬪寲GDI+鐨勫嚱鏁幫細(xì)
GdiplusStartup(&m_gdiplusToken, &m_gdiplusStartupInput, NULL); 	
鍦∣nDestroy()鍑芥暟涓姞鍏ョ粨鏉烥DI+浣跨敤鐨勫嚱鏁幫細(xì)
	GdiplusShutdown(m_gdiplusToken);
鎺ョ潃錛屽畾涔夎漿鎹㈠嚱鏁幫細(xì)
BOOL MBmpToMImage(CMemFile& cbfBmp, CMemFile& cbfImage, CString strType)
鍏朵腑錛?
CMemFile& cbfBmp琛ㄧず鍘熶綅鍥炬枃浠?
CMemFile& cbfImage琛ㄧず杞崲鍚庣殑鍥懼艦鏂囦歡;
CString strType琛ㄧず杞崲鐨勫浘鐗囩被鍨嬨?br />
璇ュ嚱鏁頒腑涓昏鐨勫鐞嗕負(fù)浠ヤ笅鍑犳錛?ol>
  • 灝嗗師浣嶅浘鏂囦歡杞崲涓篒Stream
  • 瀹氫箟Image綾誨疄渚嬶紝騫朵嬌鐢ㄧ1姝ヨ幏寰楃殑IStream鍒濆鍖?/li>
  • 鑾峰彇杞崲鐨勫浘鐗囩被鍨嬬殑CLSID
  • 灝咺mage浠ヨ漿鎹㈢殑鍥劇墖綾誨瀷淇濆瓨鍒癐Stream涓?/li>
  • 灝咺Stream杞崲涓篊MemFile鍐呭瓨鏂囦歡(涔熷彲涓篊File)
  • 璇︾粏浠g爜濡備笅錛?

    BOOL MBmpToMImage(CMemFile& cbfBmp, CMemFile& cbfImage, CString strType)
    {
    int iBmpSize = cbfBmp.GetLength();
    HGLOBAL hMemBmp = GlobalAlloc(GMEM_FIXED, iBmpSize);
    if (hMemBmp == NULL) return FALSE;
    IStream* pStmBmp = NULL;
    CreateStreamOnHGlobal(hMemBmp, FALSE, &pStmBmp);
    if (pStmBmp == NULL)
    {
    GlobalFree(hMemBmp);
    return FALSE;
    }
    BYTE* pbyBmp = (BYTE *)GlobalLock(hMemBmp);
    cbfBmp.SeekToBegin();
    cbfBmp.Read(pbyBmp, iBmpSize);

    Image* imImage = NULL;
    imImage = Image::FromStream(pStmBmp, FALSE);
    if (imImage == NULL)
    {
    GlobalUnlock(hMemBmp);
    GlobalFree(hMemBmp);
    return FALSE;
    }
    USES_CONVERSION;
    CLSID clImageClsid;
    GetImageCLSID(A2W("image/"+strType.GetBuffer(0)), &clImageClsid);

    HGLOBAL hMemImage = GlobalAlloc(GMEM_MOVEABLE, 0);
    if (hMemImage == NULL)
    {
    pStmBmp->Release();
    GlobalUnlock(hMemBmp);
    GlobalFree(hMemBmp);
    if (imImage != NULL) delete imImage;
    return FALSE;
    }
    IStream* pStmImage = NULL;
    CreateStreamOnHGlobal(hMemImage, TRUE, &pStmImage);
    if (pStmImage == NULL)
    {
    pStmBmp->Release();
    GlobalUnlock(hMemBmp);
    GlobalFree(hMemBmp);
    GlobalFree(hMemImage);
    if (imImage != NULL) delete imImage
    return FALSE;
    }
    imImage->Save(pStmImage, &clJpgClsid);
    if (pStmImage == NULL)
    {
    pStmBmp->Release();
    pStmImage>Release();
    GlobalUnlock(hMemBmp);
    GlobalFree(hMemBmp);
    GlobalFree(hMemImage;
    if (imImage != NULL) delete imImage;
    return FALSE;
    }
    LARGE_INTEGER liBegin = {0};
    pStmImage->Seek(liBegin, STREAM_SEEK_SET, NULL);
    BYTE* pbyImage = (BYTE *)GlobalLock(hMemImage);
    cbfImage.SeekToBegin();
    cbfImage.Write(pbyImage, GlobalSize(hMemImage));

    if (imImage != NULL) delete imImage;
    pStmBmp->Release();
    pStmImage->Release();
    GlobalUnlock(hMemBmp);
    GlobalUnlock(hMemImage);
    GlobalFree(hMemBmp);
    GlobalFree(hMemImage);
    return TRUE;
    }


    swo 2006-08-08 17:02 鍙戣〃璇勮
    ]]>
    Reading and Writing Metadatahttp://m.shnenglu.com/swo2006/articles/11002.htmlswoswoTue, 08 Aug 2006 08:46:00 GMThttp://m.shnenglu.com/swo2006/articles/11002.htmlhttp://m.shnenglu.com/swo2006/comments/11002.htmlhttp://m.shnenglu.com/swo2006/articles/11002.html#Feedback0http://m.shnenglu.com/swo2006/comments/commentRss/11002.htmlhttp://m.shnenglu.com/swo2006/services/trackbacks/11002.html Reading and Writing Metadata [杞澆]

    Some image files contain metadata that you can read to determine features of the image. For example, a digital photograph might contain metadata that you can read to determine the make and model of the camera used to capture the image. With Microsoft Windows GDI+, you can read existing metadata, and you can also write new metadata to image files.

    GDI+ provides a uniform way of storing and retrieving metadata from image files in various formats. In GDI+, a piece of metadata is called a property item. You can store and retrieve metadata by calling the SetPropertyItem and GetPropertyItem methods of the Image class, and you don't have to be concerned about the details of how a particular file format stores that metadata.

    GDI+ currently supports metadata for the TIFF, JPEG, Exif, and PNG file formats. The Exif format, which specifies how to store images captured by digital still cameras, is built on top of the TIFF and JPEG formats. Exif uses the TIFF format for uncompressed pixel data and the JPEG format for compressed pixel data.

    GDI+ defines a set of property tags that identify property items. Certain tags are general-purpose; that is, they are supported by all of the file formats mentioned in the preceding paragraph. Other tags are special-purpose and apply only to certain formats. If you try to save a property item to a file that does not support that property item, GDI+ ignores the request. More specifically, the Image::SetPropertyItem method returns PropertyNotSupported.

    You can determine the property items that are stored in an image file by calling Image::GetPropertyIdList. If you try to retrieve a property item that is not in the file, GDI+ ignores the request. More specifically, the Image::GetPropertyItem method returns PropertyNotFound.

    Reading Metadata from a File

    The following console application calls the GetPropertySize method of an Image object to determine how many pieces of metadata are in the file FakePhoto.jpg.

    				#include <windows.h>
    #include <gdiplus.h>
    #include <stdio.h>
    using namespace Gdiplus;
    INT main()
    {
    // Initialize <tla rid="tla_gdiplus"/>.
    GdiplusStartupInput gdiplusStartupInput;
    ULONG_PTR gdiplusToken;
    GdiplusStartup(&gdiplusToken, &gdiplusStartupInput, NULL);
    UINT size = 0;
    UINT count = 0;
    Bitmap* bitmap = new Bitmap(L"FakePhoto.jpg");
    bitmap->GetPropertySize(&size, &count);
    printf("There are %d pieces of metadata in the file.\n", count);
    printf("The total size of the metadata is %d bytes.\n", size);

    delete bitmap;
    GdiplusShutdown(gdiplusToken);
    return 0;
    }

    The preceding code, along with a particular file, FakePhoto.jpg, produced the following output:

    				There are 7 pieces of metadata in the file.
    The total size of the metadata is 436 bytes.

    GDI+ stores an individual piece of metadata in a PropertyItem object. You can call the GetAllPropertyItems method of the Image class to retrieve all the metadata from a file. The GetAllPropertyItems method returns an array of PropertyItem objects. Before you call GetAllPropertyItems, you must allocate a buffer large enough to receive that array. You can call the GetPropertySize method of the Image class to get the size (in bytes) of the required buffer.

    A PropertyItem object has the following four public members:

    id A tag that identifies the metadata item. The values that can be assigned to id (PropertyTagImageTitle, PropertyTagEquipMake, PropertyTagExifExposureTime, and the like) are defined in Gdiplusimaging.h.
    length The length, in bytes, of the array of values pointed to by the value data member. Note that if the type data member is set to PropertyTagTypeASCII, then the length data member is the length of a null-terminated character string, including the NULL terminator.
    type The data type of the values in the array pointed to by the value data member. Constants (PropertyTagTypeByte, PropertyTagTypeASCII, and the like) that represent various data types are described in Image Property Tag Type Constants.
    value A pointer to an array of values.

    The following console application reads and displays the seven pieces of metadata in the file FakePhoto.jpg. The main function relies on the helper function PropertyTypeFromWORD, which is shown following the main function.

    				#include <windows.h>
    #include <gdiplus.h>
    #include <strsafe.h>
    using namespace Gdiplus;

    INT main()
    {
    // Initialize GDI+
    GdiplusStartupInput gdiplusStartupInput;
    ULONG_PTR gdiplusToken;
    GdiplusStartup(&gdiplusToken, &gdiplusStartupInput, NULL);

    UINT size = 0;
    UINT count = 0;

    #define MAX_PROPTYPE_SIZE 30
    WCHAR strPropertyType[MAX_PROPTYPE_SIZE] = L"";

    Bitmap* bitmap = new Bitmap(L"FakePhoto.jpg");

    bitmap->GetPropertySize(&size, &count);
    printf("There are %d pieces of metadata in the file.\n\n", count);

    // GetAllPropertyItems returns an array of PropertyItem objects.
    // Allocate a buffer large enough to receive that array.
    PropertyItem* pPropBuffer =(PropertyItem*)malloc(size);

    // Get the array of PropertyItem objects.
    bitmap->GetAllPropertyItems(size, count, pPropBuffer);

    // For each PropertyItem in the array, display the id, type, and length.
    for(UINT j = 0; j < count; ++j)
    {
    // Convert the property type from a WORD to a string.
    PropertyTypeFromWORD(
    pPropBuffer[j].type, strPropertyType, MAX_PROPTYPE_SIZE);

    printf("Property Item %d\n", j);
    printf(" id: 0x%x\n", pPropBuffer[j].id);
    wprintf(L" type: %s\n", strPropertyType);
    printf(" length: %d bytes\n\n", pPropBuffer[j].length);
    }

    free(pPropBuffer);
    delete bitmap;
    GdiplusShutdown(gdiplusToken);
    return 0;
    } // main

    // Helper function
    HRESULT PropertyTypeFromWORD(WORD index, WCHAR* string, UINT maxChars)
    {
    HRESULT hr = E_FAIL;

    WCHAR* propertyTypes[] = {
    L"Nothing", // 0
    L"PropertyTagTypeByte", // 1
    L"PropertyTagTypeASCII", // 2
    L"PropertyTagTypeShort", // 3
    L"PropertyTagTypeLong", // 4
    L"PropertyTagTypeRational", // 5
    L"Nothing", // 6
    L"PropertyTagTypeUndefined", // 7
    L"Nothing", // 8
    L"PropertyTagTypeSLONG", // 9
    L"PropertyTagTypeSRational"}; // 10

    hr = StringCchCopyW(string, maxChars, propertyTypes[index]);
    return hr;
    }

    The preceding console application produces the following output:

    				Property Item 0
    id: 0x320
    type: PropertyTagTypeASCII
    length: 16 bytes
    Property Item 1
    id: 0x10f
    type: PropertyTagTypeASCII
    length: 17 bytes
    Property Item 2
    id: 0x110
    type: PropertyTagTypeASCII
    length: 7 bytes
    Property Item 3
    id: 0x9003
    type: PropertyTagTypeASCII
    length: 20 bytes
    Property Item 4
    id: 0x829a
    type: PropertyTagTypeRational
    length: 8 bytes
    Property Item 5
    id: 0x5090
    type: PropertyTagTypeShort
    length: 128 bytes
    Property Item 6
    id: 0x5091
    type: PropertyTagTypeShort
    length: 128 bytes

    The preceding output shows a hexadecimal ID number for each property item. You can look up those ID numbers in Image Property Tag Constants and find out that they represent the following property tags.

    Hexadecimal value Property tag
    0x0320

    0x010f

    0x0110

    0x9003

    0x829a

    0x5090

    0x5091

    PropertyTagImageTitle

    PropertyTagEquipMake

    PropertyTagEquipModel

    PropertyTagExifDTOriginal

    PropertyTagExifExposureTime

    PropertyTagLuminanceTable

    PropertyTagChrominanceTable

    The second (index 1) property item in the list has id PropertyTagEquipMake and type PropertyTagTypeASCII. The following example, which is a continuation of the previous console application, displays the value of that property item:

    				printf("The equipment make is %s.\n", pPropBuffer[1].value);
    		

    The preceding line of code produces the following output:

    				The equipment make is Northwind Traders.
    		

    The fifth (index 4) property item in the list has id PropertyTagExifExposureTime and type PropertyTagTypeRational. That data type (PropertyTagTypeRational) is a pair of LONGs. The following example, which is a continuation of the previous console application, displays those two LONG values as a fraction. That fraction, 1/125, is the exposure time measured in seconds.

    				long* ptrLong = (long*)(pPropBuffer[4].value);
    printf("The exposure time is %d/%d.\n", ptrLong[0], ptrLong[1]);

    The preceding code produces the following output:

    				The exposure time is 1/125.
    		

    Writing Metadata to a File

    To write an item of metadata to an Image object, initialize a PropertyItem object and then pass the address of that PropertyItem object to the SetPropertyItem method of the Image object.

    The following console application writes one item (the image title) of metadata to an Image object and then saves the image in the disk file FakePhoto2.jpg. The main function relies on the helper function GetEncoderClsid, which is shown in the topic Retrieving the Class Identifier for an Encoder.

    				#include <windows.h>
    #include <gdiplus.h>
    #include <stdio.h>
    using namespace Gdiplus;
    INT main()
    {
    // Initialize <tla rid="tla_gdiplus"/>.
    GdiplusStartupInput gdiplusStartupInput;
    ULONG_PTR gdiplusToken;
    GdiplusStartup(&gdiplusToken, &gdiplusStartupInput, NULL);
    Status stat;
    CLSID clsid;
    char propertyValue[] = "Fake Photograph";
    Bitmap* bitmap = new Bitmap(L"FakePhoto.jpg");
    PropertyItem* propertyItem = new PropertyItem;
    // Get the CLSID of the JPEG encoder.
    GetEncoderClsid(L"image/jpeg", &clsid);
    propertyItem->id = PropertyTagImageTitle;
    propertyItem->length = 16; // string length including NULL terminator
    propertyItem->type = PropertyTagTypeASCII;
    propertyItem->value = propertyValue;
    bitmap->SetPropertyItem(propertyItem);
    stat = bitmap->Save(L"FakePhoto2.jpg", &clsid, NULL);
    if(stat == Ok)
    printf("FakePhoto2.jpg saved successfully.\n");

    delete propertyItem;
    delete bitmap;
    GdiplusShutdown(gdiplusToken);
    return 0;
    }


    swo 2006-08-08 16:46 鍙戣〃璇勮
    ]]>
    鍦℅DI+涓粯鍒禛IFhttp://m.shnenglu.com/swo2006/articles/11000.htmlswoswoTue, 08 Aug 2006 08:24:00 GMThttp://m.shnenglu.com/swo2006/articles/11000.htmlhttp://m.shnenglu.com/swo2006/comments/11000.htmlhttp://m.shnenglu.com/swo2006/articles/11000.html#Feedback0http://m.shnenglu.com/swo2006/comments/commentRss/11000.htmlhttp://m.shnenglu.com/swo2006/services/trackbacks/11000.html
    GDI+涓粯鍒朵竴涓浘鐗囩殑浠g爜濡備笅:
    void CMyWnd::OnPaint()
    {
    CPaintDC dc(this);
    Graphics graphics(&dc); // Create a GDI+ graphics object

    Image image(L"Test.Gif"); // Construct an image
    graphics.DrawImage(&image, 0, 0, image.GetWidth(), image.GetHeight());
    }

    Gif 鍒嗕負(fù)涓ょ錛屼竴縐嶆槸闈?rùn)鎬佺殑錛屽浜庤繖縐嶆牸寮忕殑Gif錛屽湪GDI+涓棤闇閲囩敤浠諱綍鏂規(guī)硶灝辮兘澶熺洿鎺ユ樉紺?涓婇潰鐨勪唬鐮佸氨灞炰簬榪欑鎯呭喌)銆傚彟涓縐嶆槸鍔ㄦ佺殑錛? 榪欑鏂囦歡鑳藉鏄劇ず綆鍗曠殑鍔ㄧ敾銆傚姩鎬佺殑瀹為檯涓婄敱澶氬箙闈?rùn)鎬佺殑緇勬垚錛屽湪鏄劇ずGif鏃訛紝姣忓箙鍥劇墖鎸夌収涓瀹氱殑鏃墮棿闂撮殧渚濇榪涜鏄劇ず錛屼粠鑰屽疄鐜頒簡(jiǎn)鍔ㄧ敾鏁堟灉銆?
    鎴戞妸GIF灝佽鎴愪簡(jiǎn)涓涓被ImageEx,榪欎釜綾葷戶鎵夸簡(jiǎn)GDI+涓殑Image綾匯傛垜浠鍏堣鍋氱殑宸ヤ綔鏄垽鏂璆IF鏄姩鎬佺殑榪樻槸闈?rùn)鎬佺殑銆?
    bool ImageEx::TestForAnimatedGIF()
    {
    UINT count = 0;
    count = GetFrameDimensionsCount();
    GUID* pDimensionIDs = new GUID[count];

    // 寰楀埌瀛愬撫鐨勫璞″垪琛?br /> GetFrameDimensionsList(pDimensionIDs, count);

    //鑾峰彇鎬誨撫鏁?br /> m_nFrameCount = GetFrameCount(&pDimensionIDs[0]);

    // 鍋囪鍥懼儚鍏鋒湁灞炴ф潯鐩?PropertyItemEquipMake.
    // 鑾峰彇姝ゆ潯鐩殑澶у皬.
    int nSize = GetPropertyItemSize(PropertyTagFrameDelay);

    // 涓哄睘鎬ф潯鐩垎閰嶇┖闂?
    m_pPropertyItem = (PropertyItem*) malloc(nSize);
    GetPropertyItem(PropertyTagFrameDelay, nSize, m_pPropertyItem);
    delete pDimensionIDs;
    return m_nFrameCount > 1;

    }
    m_pPropertyItem->value 鏄竴涓暱鏁村艦鏁扮粍, 姣忎釜闀挎暣褰唬琛ㄦ瘡甯х殑寤舵椂銆傜敱浜庤幏鍙栫殑灞炴т笉鍚岋紝GetPropertyItem浼?xì)鑾峰緱涓嶅悓澶畯鐨勫璞″Q? 鍥犳瑕佺敱鐢ㄦ埛鏉ヨ幏寰楃殑瀵硅薄澶у皬錛屽紑杈熶笌鍒犻櫎 GetPropertyItem鐩稿叧鐨勫唴瀛樸傚璞$殑澶у皬鏄氳繃GetPropertyItemSize 鑾峰彇鐨勶紝鍏跺弬鏁版槸浣犳墍鎰熷叴瓚g殑灞炴ф潯鐩?涓鏃﹁幏鍙栦簡(jiǎn)甯х殑鏁伴噺涓庡歡鏃訛紝鎴戜滑灝卞彲鐢熸垚涓涓嚎紼嬫潵璋冪敤 DrawFrameGIF錛堬級(jí)鏉ユ樉紺恒?
    bool ImageEx::DrawFrameGIF()
    {
    ::WaitForSingleObject(m_hPause, INFINITE);
    GUID pageGuid = FrameDimensionTime;
    long hmWidth = GetWidth();
    long hmHeight = GetHeight();
    HDC hDC = GetDC(m_hWnd);
    if (hDC)
    {
    Graphics graphics(hDC);
    graphics.DrawImage(this, m_rc.left, m_rc.top, hmWidth, hmHeight);
    ReleaseDC(m_hWnd, hDC);
    }
    SelectActiveFrame(&pageGuid, m_nFramePosition++);
    if (m_nFramePosition == m_nFrameCount)
    m_nFramePosition = 0;

    long lPause = ((long*) m_pPropertyItem->value)[m_nFramePosition] * 10;
    DWORD dwErr = WaitForSingleObject(m_hExitEvent, lPause);
    return dwErr == WAIT_OBJECT_0;
    }

    swo 2006-08-08 16:24 鍙戣〃璇勮
    ]]>
    鍦╒C涓鏋滃疄鐜癎IF鐨勬挱鏀撅紵http://m.shnenglu.com/swo2006/articles/10996.htmlswoswoTue, 08 Aug 2006 06:51:00 GMThttp://m.shnenglu.com/swo2006/articles/10996.htmlhttp://m.shnenglu.com/swo2006/comments/10996.htmlhttp://m.shnenglu.com/swo2006/articles/10996.html#Feedback1http://m.shnenglu.com/swo2006/comments/commentRss/10996.htmlhttp://m.shnenglu.com/swo2006/services/trackbacks/10996.html 鍦╒C涓鏋滃疄鐜癎IF鐨勬挱鏀撅紵
    void 聽 CImageView::OnDraw(CDC* 聽 pDC) 聽
    聽 { 聽
    聽 聽 聽 聽 聽 CImageDoc* 聽 pDoc 聽 = 聽 GetDocument(); 聽
    聽 聽 聽 聽 聽 ASSERT_VALID(pDoc); 聽
    聽 聽 聽 聽 聽 // 聽 TODO: 聽 add 聽 draw 聽 code 聽 for 聽 native 聽 data 聽 here 聽
    聽 聽 聽 聽 聽 IPicture 聽 *pPic; 聽 聽
    聽 聽 聽 聽 聽 IStream 聽 *pStm; 聽 聽
    聽 聽 聽 聽 聽 聽
    聽 聽 聽 聽 聽 CFileStatus 聽 fstatus; 聽 聽
    聽 聽 聽 聽 聽 CFile 聽 file; 聽 聽
    聽 聽 聽 聽 聽 LONG 聽 cb; 聽 聽
    聽 聽 聽 聽 聽 聽
    聽 聽 聽 聽 聽 if 聽 (file.Open("c:/a.jpg",CFile::modeRead) 聽
    聽 聽 聽 聽 聽 聽 聽 聽 聽 &&file.GetStatus("c:/a.jpg", 聽 fstatus) 聽
    聽 聽 聽 聽 聽 聽 聽 聽 聽 &&((cb 聽 = 聽 fstatus.m_size) 聽 != 聽 -1)) 聽 聽
    聽 聽 聽 聽 聽 { 聽 聽
    聽 聽 聽 聽 聽 聽 聽 聽 聽 HGLOBAL 聽 hGlobal 聽 = 聽 GlobalAlloc(GMEM_MOVEABLE, 聽 cb); 聽 聽
    聽 聽 聽 聽 聽 聽 聽 聽 聽 LPVOID 聽 pvData 聽 = 聽 NULL; 聽 聽
    聽 聽 聽 聽 聽 聽 聽 聽 聽 if 聽 (hGlobal 聽 != 聽 NULL) 聽 聽
    聽 聽 聽 聽 聽 聽 聽 聽 聽 { 聽 聽
    聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 if 聽 ((pvData 聽 = 聽 GlobalLock(hGlobal)) 聽 != 聽 NULL) 聽 聽
    聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 { 聽 聽
    聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 file.ReadHuge(pvData, 聽 cb); 聽 聽
    聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 GlobalUnlock(hGlobal); 聽 聽
    聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 CreateStreamOnHGlobal(hGlobal, 聽 TRUE, 聽 &pStm); 聽 聽
    聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽
    聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 if(SUCCEEDED(::OleLoadPicture(pStm,fstatus.m_size,TRUE,IID_IPicture,(LPVOID* 聽 )&pPic))) 聽 聽
    聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 { 聽 聽
    聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 OLE_XSIZE_HIMETRIC 聽 hmWidth; 聽 聽
    聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 OLE_YSIZE_HIMETRIC 聽 hmHeight; 聽 聽
    聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽
    聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 pPic->get_Width(&hmWidth); 聽 聽
    聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 pPic->get_Height(&hmHeight); 聽 聽
    聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽
    聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 double 聽 fX,fY; 聽 聽
    聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 fX 聽 = 聽 (double)pDC->GetDeviceCaps(HORZRES)*(double)hmWidth/((double)pDC->GetDeviceCaps(HORZSIZE)*100.0); 聽 聽
    聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 fY 聽 = 聽 (double)pDC->GetDeviceCaps(VERTRES)*(double)hmHeight/((double)pDC->GetDeviceCaps(VERTSIZE)*100.0); 聽 聽
    聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 if(FAILED(pPic->Render(*pDC,0,0,(DWORD)fX,(DWORD)fY,0,hmHeight,hmWidth,-hmHeight,NULL))) 聽 聽
    聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 AfxMessageBox("Failed 聽 To 聽 Render 聽 The 聽 picture!"); 聽 聽
    聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 pPic->Release(); 聽 聽
    聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 } 聽 聽
    聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 else 聽 聽
    聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 AfxMessageBox("Error 聽 Loading 聽 Picture 聽 From 聽 Stream!"); 聽 聽
    聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 } 聽 聽
    聽 聽 聽 聽 聽 聽 聽 聽 聽 } 聽 聽
    聽 聽 聽 聽 聽 } 聽 聽
    聽 聽 聽 聽 聽 else 聽 聽
    聽 聽 聽 聽 聽 聽 聽 聽 聽 AfxMessageBox("Can't 聽 Open 聽 Image 聽 File!"); 聽 聽
    聽 聽
    聽 } 聽


    swo 2006-08-08 14:51 鍙戣〃璇勮
    ]]>
    鍦╒C涓嬫樉紺篔PEG銆丟IF鏍煎紡鍥懼儚鐨勪竴縐嶇畝渚挎柟娉?/title><link>http://m.shnenglu.com/swo2006/articles/10995.html</link><dc:creator>swo</dc:creator><author>swo</author><pubDate>Tue, 08 Aug 2006 06:48:00 GMT</pubDate><guid>http://m.shnenglu.com/swo2006/articles/10995.html</guid><wfw:comment>http://m.shnenglu.com/swo2006/comments/10995.html</wfw:comment><comments>http://m.shnenglu.com/swo2006/articles/10995.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.shnenglu.com/swo2006/comments/commentRss/10995.html</wfw:commentRss><trackback:ping>http://m.shnenglu.com/swo2006/services/trackbacks/10995.html</trackback:ping><description><![CDATA[ <h1> <font size="4"> <span id="hvzpftn" class="f16b">鍦╒C涓嬫樉紺篔PEG銆丟IF鏍煎紡鍥懼儚鐨勪竴縐嶇畝渚挎柟娉?/span> </font> </h1> <font face="Arial"> <br /> </font> <span id="hvzpftn" class="f141"> <font face="Arial">涓銆?寮曡█ <br /> 銆銆 JPEG鍥懼儚鍘嬬緝鏍囧噯闅忕劧鏄竴縐嶆湁鎹熷浘鍍忓帇緙╂爣鍑嗭紝浣嗙敱浜庝漢鐪艱瑙夌殑涓嶆晱鎰燂紝緇忓帇緙╁悗鐨勭敾璐ㄥ熀鏈病鏈夊彂鐢熷彉鍖栵紝寰堝揩渚夸互杈冮珮鐨勫帇緙╃巼寰楀埌浜?jiǎn)骞挎硾鐨勮鍙? GIF鏍煎紡铏界劧浠呮敮鎸?56鑹蹭絾瀹冨浜庨鑹茶緝?yōu)畱鐨勫洃謨忔湁鐫寰堥珮鐨勫帇緙╃巼錛岀敋鑷寵秴榪嘕PEG鏍囧噯錛屼篃寰楀埌浜?jiǎn)骞挎硾鐨勮鍚屻備絾浣滀負(fù)浼楀紼嬪簭鍛樼殑涓涓噸瑕佺殑寮鍙戝伐 鍏?-Microsoft Visual C++ 6.0鐨凪FC搴撳嵈浠呭娌℃湁緇忚繃浠諱綍鍘嬬緝鐨凚MP浣嶅浘鏂囦歡鏈夌潃鑹ソ鐨勬敮鎸侊紝鍙互璇誨彇銆佹樉紺恒佸瓨鍌ㄧ敋鑷沖湪鍐呭瓨涓垱寤轟竴鍧楀唴瀛樹綅鍥俱傜敱浜嶣MP鏍煎紡鐨勫浘鍍忔病鏈? 緇忚繃浠諱綍鐨勫帇緙╋紝涓嶈鏄綔涓虹▼搴忕殑澶栭儴鏂囦歡錛岃繕鏄綔涓虹▼搴忕殑鍐呴儴璧勬簮閮借鍗犳嵁澶ч噺鐨勭┖闂達(dá)紝灝ゅ叾鏄悗鑰呬細(xì)澶уぇ澧炲姞鍙墽琛屾枃浠剁殑闀垮害銆傚彲浠ョ湅鍑猴紝濡傛灉鑳界敤緇忚繃 鍘嬬緝銆佸叿鏈夎緝濂界殑鍘嬬緝鐜囩殑JPEG鎴朑IF鏍煎紡鐨勫浘鍍忔潵鍙栦唬BMP鏂囦歡鍦╒C涓殑搴旂敤錛屾棤鐤戣繕鏄緢鏈夊惛寮曞姏鐨勩?<br /> 浜屻?璁捐鎬濊礬 <br /> 銆銆 铏界劧鏈変竴浜涙搷浣溿佸鐞咼PEG銆丟IF絳夊叾浠栨牸寮忓浘鍍忕殑Active X鎺т歡錛屼絾鎬葷殑鏉ヨ浣跨敤璧鋒潵騫朵笉澶柟渚匡紝絎旇呯粡榪囧疄楠屾懜绱紝鎬葷粨鍑轟簡(jiǎn)涓縐嶅熷姪浜嶤OM鎺ュ彛鐨凮LE鏂規(guī)硶鏉ュ疄鐜頒笂榪板姛鑳界殑涓縐嶇畝渚挎柟娉曪紝鐜頒粙緇嶅涓嬩互椋ㄥ箍澶ц鑰咃細(xì) <br /> 涓嬮潰鎴戜滑瑕佷嬌鐢↖Picture 鐨凜OM鎺ュ彛錛屾湁蹇呰瀵硅鍥懼儚鎺ュ彛鍋氫簺浜?jiǎn)瑙eQ氳鎺ュ彛涓昏綆$悊鍥懼儚瀵硅薄鍙?qiáng)鍏跺睘鎬э紝鍥懼儚瀵硅薄涓轟綅鍥俱佸浘鏍囧拰鍥懼厓絳夋彁渚涗竴縐嶄笌璇█鏃犲叧鐨勬娊璞°傚拰鏍囧噯鐨勫瓧浣撳璞? 涓鏍鳳紝緋葷粺涔熸彁渚涗簡(jiǎn)瀵瑰浘鍍忓璞$殑鏍囧噯瀹炵幇銆傚叾涓昏鐨勬帴鍙f槸IPicture鍜孖PictureDisp錛屽悗鑰呮槸鐢盜Dispatch鎺ュ彛媧劇敓浠ヤ究閫氳繃鑷姩 鍖栧鍥懼儚鐨勫睘鎬ц繘琛岃闂傚浘鍍忓璞′篃鏀寔澶栭儴鎺ュ彛IPropertyNotifySink錛屼互渚跨敤鎴瘋兘鍦ㄥ浘鍍忓睘鎬у彂鐢熸敼鍙樻椂浣滃嚭鍐沖畾銆傚浘鍍忓璞′篃鏀寔 IPersistStream鎺ュ彛錛屾墍浠ュ畠鑳戒粠涓涓狪Stream鎺ュ彛鐨勫疄渚嬪璞′繚瀛樸佽杞借嚜宸憋紝鑰孖Stream鎺ュ彛涔熸敮鎸佸嫻佸璞$殑鏁版嵁璇誨啓銆?<br /> 銆銆 鎴戜滑鍙互鐢ㄥ嚱鏁癘leLoadPicture浠庡寘鍚湁鍥懼儚鏁版嵁鐨勬祦涓杞藉浘鍍忋傝鍑芥暟綆鍖栦簡(jiǎn)鍩轟簬嫻佺殑鍥懼儚瀵硅薄鐨勫垱寤鴻繃紼嬶紝鍙互鍒涘緩涓涓柊鐨勫浘鍍忓璞″茍涓旂敤嫻佷腑鐨勫唴瀹瑰瀹冭繘琛屽垵濮嬪寲銆傚叾鍑芥暟鍘熷瀷涓猴細(xì) <br /> STDAPI OleLoadPicture( IStream * pStream, //鎸囧悜鍖呭惈鏈夊浘鍍忔暟鎹殑嫻佺殑鎸囬拡LONG lSize, //浠庢祦涓鍙栫殑瀛楄妭鏁癇OOL fRunmode, //鍥懼儚灞炴у搴旂殑鍒濆糝EFIID riid, //娑夊強(qiáng)鍒扮殑鎺ュ彛鏍囪瘑錛屾弿榪拌榪斿洖鐨勬帴鍙f寚閽堢殑綾誨瀷VOID ppvObj // 鍦╮rid涓敤鍒扮殑鎺ュ彛鎸囬拡鍙橀噺鐨勫湴鍧); <br /><br /> 涓夈?鍏蜂綋鐨勫疄鐜?<br /> 銆銆 鍦ㄦ樉紺哄浘鍍忎箣鍓嶏紝棣栧厛瑕佽幏鍙栧埌鍥懼儚鏂囦歡鐨勫瓨鏀捐礬寰勶紝榪欓噷閲囩敤鏍囧噯鐨勬枃浠舵墦寮瀵硅瘽妗嗘潵閫夊彇鍥懼儚鏂囦歡錛屾枃浠跺悕瀛樻斁鍦–String鍨嬬殑鍙橀噺m_sPath涓細(xì) <br /> CFileDialog dlg(TRUE,"jpg","*.jpg", <br /> OFN_HIDEREADONLY|OFN_OVERWR99vEPROMPT, <br /> "JPEG鏂囦歡(*.jpg)|*.jpg|GIF鏂囦歡(*.gif)|*.gif||",NULL); <br /> if(dlg.DoModal()==IDOK) <br /> { <br /> m_sPath=dlg.GetPathName(); <br /> Invalidate(); <br /> } <br /> 涓虹畝鍗曡錛屽浘褰㈡樉紺虹殑浠g爜鐩存帴鍦ㄨ綾諱腑鐨凮nDraw涓紪鍐欙紝棣栧厛鎵撳紑鏂囦歡騫跺垽鏂枃浠剁殑鍙敤鎬э紝騫舵妸鏂囦歡鍐呭鏀懼埌嫻佹帴鍙Stream鐨勫璞Stm涓細(xì) <br /> IStream *pStm; <br /> CFileStatus fstatus; <br /> CFile file; <br /> LONG cb; <br /> 鈥︹?<br /> if (file.Open(m_Path,CFile::modeRead)&&file.GetStatus(m_Path,fstatus)&& ((cb = fstatus.m_size) != -1)) <br /> { <br /> HGLOBAL hGlobal = GlobalAlloc(GMEM_MOVEABLE, cb); <br /> LPVOID pvData = NULL; <br /> if (hGlobal != NULL) <br /> { <br /> if ((pvData = GlobalLock(hGlobal)) != NULL) <br /> { <br /> file.ReadHuge(pvData, cb); <br /> GlobalUnlock(hGlobal); <br /> CreateStreamOnHGlobal(hGlobal, TRUE, &pStm); <br /> } <br /> } <br /> } <br /><br /><br /> 銆銆 鐒跺悗錛屽氨鐩存帴璋冪敤OleLoadPicture鍑芥暟浠庢祦涓杞藉浘鍍忥細(xì) <br /> IPicture *pPic; <br /> 鈥︹?<br /> OleLoadPicture(pStm,fstatus.m_size,TRUE,IID_IPicture,(LPVOID*)&pPic)); <br /><br /><br /> 銆銆 鐢變簬璇ュ嚱鏁版湁鏃朵細(xì)瀵艱嚧澶辮觸錛屾墍浠ュ簲褰撶敤SUCCEEDED瀹忔潵鍋氫竴浜涢傚綋鐨勪繚鎶ゅ伐浣?鍙湁鍦ㄦ暟鎹杞芥垚鍔熺殑鍓嶆彁涓嬫墠鑳界戶緇笅闈㈢殑鍥懼儚鏄劇ず宸ヤ綔錛?<br /> if(SUCCEEDED(OleLoadPicture(pStm,fstatus.m_size,TRUE,IID_IPicture,(LPVOID*)&pPic))) <br /> { <br /> OLE_XSIZE_HIMETRIC hmWidth; <br /> OLE_YSIZE_HIMETRIC hmHeight; <br /> pPic-錛瀏et_Width(&hmWidth); <br /> pPic-錛瀏et_Height(&hmHeight); <br /> double fX,fY; <br /> 鈥︹?<br /> fX = (double)pDC-錛濭etDeviceCaps(HORZRES)*(double)hmWidth/((double)pDC-錛濭etDeviceCaps(HORZSIZE)*100.0); <br /> fY = (double)pDC-錛濭etDeviceCaps(VERTRES)*(double)hmHeight/((double)pDC-錛濭etDeviceCaps(VERTSIZE)*100.0); <br /> if(FAILED(pPic-錛濺ender(*pDC,0,0,(DWORD)fX,(DWORD)fY,0,hmHeight,hmWidth,-hmHeight,NULL))) <br /> AfxMessageBox("娓叉煋鍥懼儚澶辮觸錛?); <br /> pPic-錛濺elease(); <br /> } <br /> else <br /> AfxMessageBox("浠庢祦涓杞藉浘鍍忓け璐ワ紒"); <br /><br /><br /><br /> 銆銆 鍏朵腑錛屾樉紺哄伐浣滀富瑕佹槸鐢盜Picture鎺ュ彛瀵硅薄鐨凴ender鍑芥暟鏉ュ畬鎴愮殑錛岃鍑芥暟涓昏鐢ㄦ潵灝嗗浘鐗囩殑鎸囧畾閮ㄥ垎鐢誨埌鎸囧畾鐨勮澶囩幆澧冪殑鎸囧畾浣嶇疆銆傚師鍨嬪涓嬶細(xì) <br /> HRESULT Render( HDC hdc, //娓叉煋鍥懼儚鐢ㄧ殑璁懼鐜鍙ユ焺 <br /> long x, //鍦╤dc涓婄殑姘村鉤鍧愭爣 <br /> long y, //鍦╤dc涓婄殑鍨傜洿鍧愭爣 <br /> long cx, //鍥懼儚瀹藉害 <br /> long cy, //鍥懼儚楂樺害 <br /> OLE_XPOS_HIMETRIC xSrc, //鍦ㄦ簮鍥懼儚涓婄殑姘村鉤鍋忕Щ <br /> OLE_YPOS_HIMETRIC ySrc, //鍦ㄦ簮鍥懼儚涓婄殑鍨傜洿鍋忕Щ <br /> OLE_XSIZE_HIMETRIC cxSrc,//鍦ㄦ簮鍥懼儚涓婃按騫蟲嫹璐濈殑鏁伴噺 <br /> OLE_YSIZE_HIMETRIC cySrc,//鍦ㄦ簮鍥懼儚涓婂瀭鐩存嫹璐濈殑鏁伴噺 <br /> LPCRECT prcWBounds //鎸囧悜鐩爣鍥懼厓璁懼鐜鍙ユ焺鐨勬寚閽?; <br /><br /><br /> 銆銆 灝忕粨錛氬埌姝や負(fù)姝紝閫氳繃涓婅堪浠g爜宸茬粡鑳藉鍦ㄧ▼搴忕殑瀹㈡埛鍖哄唴鏄劇ずJPEG銆丟IF絳夋爣鍑嗙殑鍥懼儚浜?jiǎn)锛屼絾瀵逛簬鏈夊鍝徨泟囧Q堝嵆鏈夊姩鐢伙級(jí)鐨凣IF鏍煎紡鐨勫浘鍍忥紝鐩墠榪樺彧鑳芥樉紺虹涓甯э紝濡傝瀹屾暣鐨勬樉紺篏IF 鍔ㄧ敾鐨勫叏榪囩▼錛岃繕闇瑕佸閮ˋctive X鎺т歡鐨勬敮鎸併偮? </font> <br /> </span> <img src ="http://m.shnenglu.com/swo2006/aggbug/10995.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.shnenglu.com/swo2006/" target="_blank">swo</a> 2006-08-08 14:48 <a href="http://m.shnenglu.com/swo2006/articles/10995.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>鍒╃敤Visual C++瀹炵幇AVI鏂囦歡鐨勫浘鍍忔埅鍙?/title><link>http://m.shnenglu.com/swo2006/articles/10982.html</link><dc:creator>swo</dc:creator><author>swo</author><pubDate>Tue, 08 Aug 2006 05:05:00 GMT</pubDate><guid>http://m.shnenglu.com/swo2006/articles/10982.html</guid><wfw:comment>http://m.shnenglu.com/swo2006/comments/10982.html</wfw:comment><comments>http://m.shnenglu.com/swo2006/articles/10982.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.shnenglu.com/swo2006/comments/commentRss/10982.html</wfw:commentRss><trackback:ping>http://m.shnenglu.com/swo2006/services/trackbacks/10982.html</trackback:ping><description><![CDATA[ <table border="0" cellpadding="0" cellspacing="2" width="550"> <tbody> <tr> <td align="center"> <b> <font class="BHEAD" color="#333399">鍒╃敤Visual C++瀹炵幇AVI鏂囦歡鐨勫浘鍍忔埅鍙?/font> </b> </td> </tr> <tr> <td bgcolor="#bbbbbb" height="1"> <br /> </td> </tr> <tr> <td align="center"> <font face="Arial, Helvetica, sans-serif"> <span id="hvzpftn" class="nava">2001-10-22路 路鍒?娑?路路yesky<br /><br /></span> </font> </td> </tr> <tr> <td> <span id="hvzpftn" class="txt"> <br />銆銆AVI鏂囦歡灝辨槸鎴戜滑鎵璇寸殑澶氬獟浣撴枃浠訛紝鎵璋撶殑AVI鍥懼儚灝辨槸瑙嗛鍥懼儚錛岃鏂囦歡鏄竴涓猂IFF璇存槑鏂囦歡錛屽畠鐢ㄤ簬鑾峰彇銆佺紪杈戙佹紨紺洪煶棰戙佽棰戝簭鍒椼備竴鑸殑AVI鏂囦歡鍖呭惈闊抽嫻佸拰瑙嗛嫻侊紝鏈夌殑鐗規(guī)畩鐨凙VI榪樺寘鍚竴涓帶鍒惰礬寰勬垨MIDI璺緞浣滀負(fù)闄勫姞鐨勬暟鎹祦銆?br /><br />銆 銆鐜板湪鎾斁AVI鏂囦歡鐨勮蔣浠跺緢澶氾紝浣嗗ぇ澶氭棤娉曚粠AVI瑙嗛鏂囦歡涓鍙栦竴甯у浘鍍忓茍鐢熸垚BMP鏍煎紡鐨勬枃浠躲傜瑪鑰呭湪浣跨敤AVI鏂囦歡寮鍙戦」鐩繃紼嬩腑瀵笰VI鏂囦歡鐨? 鎿嶄綔縐瘡浜?jiǎn)涓浜涚粡楠岋紝瀵逛簬濡備綍瀹炵幇浠嶢VI瑙嗛嫻佷腑鑾峰彇浠繪剰甯х殑鍥懼儚鏁版嵁騫跺瓨鍌ㄦ垚BMP鏂囦歡錛屽叾涓渶鍏抽敭鐨勬槸瑕佷粠AVI鏂囦歡涓幏鍙栧叿浣撴煇涓甯х殑鍥懼儚鏁版嵁錛? 涓烘鎴戝埄鐢╓indows鎻愪緵鐨凙PI鍑芥暟瀹炵幇浜?jiǎn)鑷畾涔夌殑CAvi綾伙紝鐢ㄤ簬鎿嶄綔AVI鏂囦歡銆?br /><br />銆銆鍦ㄤ嬌鐢ˋPI鍑芥暟鎿嶄綔AVI鏂囦歡鏃訛紝涓瀹? 瑕佹敞鎰忕敤AVIFileInit()鏉ュ垵濮嬪寲AVI搴擄紝紼嬪簭緇撴潫鏃剁敤AVIFileExit()閲婃斁AVI搴擄紝鍚﹀垯API鍑芥暟鏃犳硶浣跨敤銆傜幇浠ユ搷浣滃寘鍚湡褰? 鑹插浘鍍忕殑AVI鏂囦歡涓轟緥錛岀粰鍑篊avi綾葷殑閮ㄥ垎鍑芥暟鐨勫叿浣撳疄鐜幫紝鍏朵腑CaviCreate()鍑芥暟鐢ㄤ簬璇誨彇AVI鏂囦歡淇℃伅騫跺垵濮嬪寲Cavi綾葷殑鎴愬憳錛屼緥濡? 鏍規(guī)嵁AVI鏂囦歡淇℃伅瀹氫箟姣忓撫鍥懼儚鐨勫銆侀珮銆佹瘡甯у浘鍍忕殑淇℃伅澶寸粨鏋勭瓑絳夛紱鍑芥暟AviRead(int mFrame)鐢ㄤ簬浠嶢VI鏂囦歡涓鍙栫mFrame甯с傚疄鐜頒唬鐮佹樉紺哄涓嬶細(xì)<br /><br /><table align="center" bgcolor="#ebe9eb" border="0" width="600"><tbody><tr><td>//Cavi綾誨ご鏂囦歡瀹氫箟錛?br />class CAvi file://AVI綾伙紝澶勭悊AVI鏂囦歡<br />{<br />銆public:<br />銆int cy;//鍥捐薄楂?br />銆int cx;//鍥捐薄瀹?br />銆file://long m_maxFrame;<br />銆BYTE *pData;//瀵稿偍鍥捐薄鏁版嵁<br />銆BITMAPINFO *m_pBMI;//浣嶅浘鏂囦歡淇℃伅澶?br />銆PAVISTREAM pavi;//AVI嫻?br />銆PAVIFILE pfile;//AVI鏂囦歡鎸囬拡<br />銆AVIFILEINFO * pfi; file://AVI淇℃伅<br />銆BOOL AviRead(int mFrame);//璇籄VI鏂囦歡鐨勭mFrame甯?br />銆CAvi();//鏍囧噯鏋勯犲嚱鏁?br />銆CAviCreate(CString &string);//鐢ㄦ枃浠跺悕鍒濆鍖朅VI綾葷殑鎴愬憳<br />銆virtual ~CAvi();<br />}; <br />//Cavi綾繪枃浠跺疄鐜伴儴鍒嗭紱<br />CAvi::CAvi()<br />{ AVIFileInit();//鍒濆鍖朅VI搴?br />銆cx=0;//瀹氫箟鍥捐薄瀹姐侀珮銆佺瓑鎴愬憳<br />銆cy=0;<br />銆m_pBMI=NULL;<br />銆pData=NULL;<br />銆file://m_maxFrame=0;<br />銆pfi=NULL;<br />}<br />CAvi::~CAvi()//鏋愭瀯銆侀噴鏀炬寚閽?br />{<br />銆// AVIFileClose(pfile);<br />銆AVIFileExit();<br />銆if(pData!=NULL)<br />銆銆delete pData;<br />銆銆pData=NULL;<br /><br />銆if(m_pBMI!=NULL)<br />銆銆delete m_pBMI;<br />銆銆m_pBMI=NULL;<br />銆銆if(pfi!=NULL)<br />銆銆銆delete pfi;<br />銆銆銆pfi=NULL;<br />}<br />CAvi::CAviCreate(CString &string)//璇繪枃浠跺垵濮嬪寲璇ョ被<br />{ <br />銆HRESULT hr;<br />銆pfi=new AVIFILEINFO;<br />銆hr = AVIFileOpen(&pfile, // returned file pointer<br />銆string, // file name<br />銆OF_READ, // mode to open file with<br />銆NULL);<br />銆hr= AVIFileInfo(pfile, file://鑾峰彇AVI淇℃伅錛屾斁鍏fi涓?br />銆pfi, <br />銆sizeof(AVIFILEINFO) <br />);<br />cx=pfi->dwWidth;//鍥捐薄瀹姐侀珮<br />cy=pfi->dwHeight;<br />hr=AVIFileGetStream(//灝咥VI鍙樻垚瑙嗛嫻?br />pfile, <br />&pavi, <br />streamtypeVIDEO, <br />0//LONG lParam <br />);<br />m_pBMI=new BITMAPINFO;//瀹氫箟BMP淇℃伅澶?br />m_pBMI->bmiHeader.biBitCount=24;<br />m_pBMI->bmiHeader.biClrImportant=0;<br />m_pBMI->bmiHeader.biClrUsed=0;<br />m_pBMI->bmiHeader.biCompression=BI_RGB;<br />m_pBMI->bmiHeader.biHeight=cy;<br />m_pBMI->bmiHeader.biWidth=cx;<br />m_pBMI->bmiHeader.biPlanes=1;<br />m_pBMI->bmiHeader.biSize=sizeof(BITMAPINFOHEADER);<br />m_pBMI->bmiHeader.biXPelsPerMeter=0;<br />m_pBMI->bmiHeader.biYPelsPerMeter=0;<br />m_pBMI->bmiHeader.biSizeImage=cx*cy*3;<br />pData=(BYTE*)new char[cx*cy*3];//鏍規(guī)嵁AVI涓瑽MP鍥捐薄鐨勪俊鎭畾涔夌紦鍐插尯<br />}<br />BOOL CAvi::AviRead(int mFrame)//灝咥VI鏂囦歡鐨凪甯ф暟鎹鍏Data緙撳啿鍖?br />{<br />HRESULT hr;<br />hr= AVIStreamRead( pavi, <br />mFrame, <br />1, <br />pData, <br />cx*cy*3, <br />NULL, <br />NULL<br />);<br />if(hr==0)<br />return TRUE;<br />else<br />return FALSE;<br />}<br /></td></tr></tbody></table><br /><br />銆 銆涓婅堪Cavi綾誨疄鐜伴儴鍒嗘墍娑夊強(qiáng)鍒扮殑API鍑芥暟鍙互鍙傝冨井杞彁渚涚殑MSDN銆侰avi綾諱腑鐨刾Data緙撳啿鍖哄瓨鏀続VI鏂囦歡涓殑鍏蜂綋鏌愪竴甯у浘鍍忔暟鎹紝鍚屾椂 Cavi綾葷殑m_pBMI涓築MP鍥懼儚鏂囦歡淇℃伅緇撴瀯錛岃繖鏃跺彲浠ユ牴鎹浘鍍忕殑澶у皬瀹氫箟BMP鍥懼儚鏂囦歡澶寸粨鏋勶紝鍏充簬BMP鏂囦歡鐨勫瓨鍌紝鐢變簬綃囧箙鐨勫師鍥狅紝鎴戜笉鍦ㄥ 璁蹭簡(jiǎn)錛屾湁鍏磋叮鐨勮鑰呭彲浠ュ弬瑙佺瑪鑰呯殑鎷欎綔"Visual C++6.0寮鍙戠伆搴︿綅鍥懼鐞?錛堝ぉ鏋佺綉杞歡鏍忕洰2001.9.10鍙戣〃錛夛紝璇ユ枃閲岄潰璁茶堪浜?jiǎn)濡備綍瀛樺彇BMP鏂囦歡銆備互涓婄▼搴忓湪Windows2000銆? Visual C++6.0鐜涓嬮『鍒╃紪璇戦氳繃錛岃繍琛屾甯搞?/span> </td> </tr> </tbody> </table> <img src ="http://m.shnenglu.com/swo2006/aggbug/10982.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.shnenglu.com/swo2006/" target="_blank">swo</a> 2006-08-08 13:05 <a href="http://m.shnenglu.com/swo2006/articles/10982.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>Visual C++涓璂DB涓嶥IB浣嶅浘緙栫▼鍏ㄦ敾鐣?/title><link>http://m.shnenglu.com/swo2006/articles/10980.html</link><dc:creator>swo</dc:creator><author>swo</author><pubDate>Tue, 08 Aug 2006 05:00:00 GMT</pubDate><guid>http://m.shnenglu.com/swo2006/articles/10980.html</guid><wfw:comment>http://m.shnenglu.com/swo2006/comments/10980.html</wfw:comment><comments>http://m.shnenglu.com/swo2006/articles/10980.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.shnenglu.com/swo2006/comments/commentRss/10980.html</wfw:commentRss><trackback:ping>http://m.shnenglu.com/swo2006/services/trackbacks/10980.html</trackback:ping><description><![CDATA[ <p align="center">Visual C++涓璂DB涓嶥IB浣嶅浘緙栫▼鍏ㄦ敾鐣?br />鏉ユ簮: 澶╂瀬緗?/p> <p align="left"> <strong>1. 鍩烘湰姒傚康<br /><br /></strong>鍏堟潵鐢ㄩ氫織鐨勮鍙ヨ瑙d綅鍥懼拰璋冭壊鏉跨殑姒傚康銆?br />鎴? 浠煡閬擄紝鑷劧鐣屼腑鐨勬墍鏈夐鑹查兘鍙互鐢辯孩銆佺豢銆佽摑(R錛孏錛孊)涓夊熀鑹茬粍鍚堣屾垚銆傞拡瀵瑰惈鏈夌孩銆佺豢銆佽摑鑹叉垚鍒嗙殑澶氬皯錛屽彲浠ュ鍏跺垎鍒垎鎴?锝?55涓瓑綰э紝鑰? 綰€佺豢銆佽摑鐨勪笉鍚岀粍鍚堝叡鏈?56脳256脳256縐嶏紝鍥犳綰﹁兘琛ㄧず1600涓囩棰滆壊銆傚浜庝漢鐪艱岃█錛岃繖宸茬粡鏄?鐪熷僵鑹?浜?jiǎn)銆?br /><br />瀵規(guī)瘡涓儚绱犺繘琛屼簡(jiǎn)錛圧錛孏錛孊錛夐噺鍖栫殑鍥懼儚灝辨槸浣嶅浘錛屽叾鍦ㄨ綆楁満涓搴旀枃浠剁殑鎵╁睍鍚嶄竴鑸負(fù).bmp銆傛棦鐒剁敤R錛孏錛孊鐨勯噺鍖栧煎氨鍙互鐩存帴璁板綍涓寮犱綅鍥劇殑鎵鏈夊儚绱狅紝閭f垜浠渶瑕佽皟鑹叉澘騫蹭粈涔堝憿錛?br /><br />棣栧厛錛屾垜浠彲浠ヨ綆楀畬鍏ㄥ埄鐢紙R錛孏錛孊錛夌粍鍚堟潵瀛樺偍涓涓?00脳600鐨勪綅鍥炬墍闇瑕佺殑絀洪棿涓猴細(xì)<br /><br />800脳600脳3 = 1440000錛堝瓧鑺傦級(jí)錛?1.37M錛堝瓧鑺傦級(jí)<br /><br />鎯婁漢鐨勫ぇ錛佸洜姝わ紝璋冭壊鏉挎í絀哄嚭涓栦簡(jiǎn)錛屽畠鐨勫姛鑳藉湪浜庣紦瑙d綅鍥炬枃浠跺瓨鍌ㄧ┖闂磋繃澶х殑闂銆?br /><br />鍋囪涓涓綅鍥句負(fù)16鑹詫紝鍏跺儚绱犳繪暟涓?00脳600銆傛垜浠彧闇瑕佺敤4涓猙it灝卞彲浠ュ瓨鍌ㄨ繖涓綅鍥劇殑姣忎釜鍍忕礌鍦?6縐嶉鑹蹭腑鎵澶勭殑絳夌駭錛岀劧鍚庤皟鑹叉澘鎻愪緵浜?jiǎn)杩?6縐嶇瓑綰у搴旂殑錛圧錛孏錛孊錛夊鹼紝榪欐牱錛屽瓨鍌ㄨ繖涓?6鑹蹭綅鍥懼彧闇瑕侊細(xì)<br /><br />800脳600脳4/8 = 240000錛堝瓧鑺傦級(jí)= 0.22 M錛堝瓧鑺傦級(jí)<br /><br />棰濆鐨勫瓨鍌≧錛孏錛孊琛ㄧ殑寮閿錛堝嵆璋冭壊鏉縋alette錛屼篃縐頒負(fù)棰滆壊鏌ユ壘琛↙UT錛変粎浠呬負(fù)16脳3錛?8瀛楄妭銆?br /><br />瀛樺偍絀洪棿琚ぇ涓哄噺灝戯紒<br /><br />甯歌鐨勪綅鍥炬湁鍗曡壊銆?6鑹層?56鑹層?6浣嶅強(qiáng)24浣嶇湡褰╄壊5縐嶏紝瀵逛簬鍓嶄笁鑰咃紙鍗充笉澶т簬256鑹詫級(jí)閮藉彲浠ヨ皟鑹叉澘鏂瑰紡榪涜瀛樺偍錛岃屽16浣嶅強(qiáng)24浣嶇湡褰╄壊浠ヨ皟鑹叉澘榪涜瀛樺偍鏄笉鍒掔畻鐨勶紝瀹冧滑鐩存帴鎸夌収R錛孏錛孊鍒嗛噺榪涜瀛樺偍銆?br /><br />鍦ㄦ鍩虹涓婃垜浠潵鍒嗘瀽DDB浣嶅浘錛圖evice-dependent bitmap錛屼笌璁懼鐩稿叧鐨勪綅鍥撅級(jí)涓嶥IB浣嶅浘錛圖evice-independent bitmap錛屼笌璁懼鏃犲叧鐨勪綅鍥撅級(jí)鐨勬蹇典互鍙?qiáng)浜岃呯殑鍖哄埆銆?br /><br />DDB渚濊禆浜庡叿浣撹澶囷紝瀹冨彧鑳藉瓨鍦ㄤ簬鍐呭瓨涓紙瑙嗛鍐呭瓨鎴栫郴緇熷唴瀛橈級(jí)錛屽叾棰滆壊妯″紡蹇呴』涓庣壒瀹氱殑杈撳嚭璁懼鐩鎬竴鑷達(dá)紝浣跨敤緋葷粺璋冭壊鏉褲備竴鑸彧鑳借澆鍏ヨ壊褰╄緝綆鍗曠殑DDB浣嶅浘錛屽浜庨鑹茶緝涓板瘜鐨勪綅鍥撅紝闇浣跨敤DIB鎵嶈兘闀挎湡淇濆瓨銆?br /><br />DIB 涓嶄緷璧栦簬鍏蜂綋璁懼錛屽彲浠ョ敤鏉ユ案涔呮у湴淇濆瓨鍥捐薄銆侱IB涓鑸槸浠?.BMP鏂囦歡鐨勫艦寮忎繚瀛樺湪紓佺洏涓殑錛屾湁鏃朵篃浼?xì)淇濆瓨鍦?.DIB鏂囦歡涓? DIB浣嶅浘鐨勭壒鐐規(guī)槸灝嗛鑹蹭俊鎭偍瀛樺湪浣嶅浘鏂囦歡鑷韓鐨勯鑹茶〃涓紝搴旂敤紼嬪簭瑕佹牴鎹棰滆壊琛ㄤ負(fù)DIB鍒涘緩閫昏緫璋冭壊鏉褲傚洜姝わ紝鍦ㄨ緭鍑轟竴騫匘IB浣嶅浘涔嬪墠錛岀▼搴忓簲璇? 灝嗗叾閫昏緫璋冭壊鏉塊夊叆鍒扮浉鍏崇殑璁懼涓婁笅鏂囧茍瀹炵幇鍒扮郴緇熻皟鑹叉澘涓?br /><br /><strong>2. 渚嬬▼綆榪?br /></strong><br />鏈枃鍚庣畫鐨勮瑙i兘鍩轟簬榪欐牱鐨勪竴涓緥瀛愬伐紼嬶紝瀹冩槸涓涓熀浜庡璇濇鐨凪FC搴旂敤紼嬪簭錛屽寘鎷?涓埗鑿滃崟錛?br /><br />錛?錛?DDB浣嶅浘<br /><br />DDB浣嶅浘鐖惰彍鍗曞張鍖呮嫭涓や釜瀛愯彍鍗曪細(xì)<br /><br />a. ID錛欼DM_LOADDDBPIC caption錛氬姞杞?br /><br />鍗曞嚮浜嬩歡錛氬姞杞借祫婧愪腑鐨凞DB浣嶅浘騫舵樉紺轟箣<br /><br />b. ID錛欼DM_MARK_DDBPIC caption錛氭爣璁?br /><br />鍗曞嚮浜嬩歡錛氬湪DIB浣嶅浘涓忔槑鍦版坊鍔犲ぉ鏋佺綉logo<br /><br />錛?錛?DIB浣嶅浘<br /><br />DIB浣嶅浘鐖惰彍鍗曞張鍖呮嫭涓や釜瀛愯彍鍗曪細(xì)<br /><br />a. ID錛欼DM_OPENDIBPIC caption錛氭墦寮<br /><br />鍗曞嚮浜嬩歡錛氬脊鍑烘枃浠跺璇濇錛屾墦寮.bmp浣嶅浘鏂囦歡錛屽茍鏄劇ず<br /><br />b. ID錛欼DM_MARK_DIBPIC caption錛氭爣璁?br /><br />鍗曞嚮浜嬩歡錛氬湪DIB浣嶅浘涓忔槑鍦版坊鍔犲ぉ鏋佺綉logo<br /><br />宸ョ▼涓繕鍖呭惈涓嬪垪浣嶅浘璧勬簮錛?br /><br />錛?錛塈DB_LOADED_BITMAP錛氳鍔犺澆鐨勪綅鍥捐祫婧?br /><br />錛?錛塈DB_YESKY_BITMAP錛氬ぉ鏋佺綉logo<br /><br />鍚庣畫綃囩珷灝嗛泦涓湪瀵?涓瓙鑿滃崟鍗曞嚮浜嬩歡娑堟伅澶勭悊鍑芥暟鐨勮瑙o紝涓嬮潰鐨勪唬鐮佹槸鏁翠釜瀵硅瘽妗嗙被CBitMapExampleDlg鐨勬秷鎭槧灝勶細(xì)<br /><br /><code>BEGIN_MESSAGE_MAP(CBitMapExampleDlg, CDialog)<br />//{{AFX_MSG_MAP(CBitMapExampleDlg)<br />ON_WM_SYSCOMMAND()<br />ON_WM_PAINT()<br />ON_WM_QUERYDRAGICON()<br />ON_COMMAND(IDM_LOADDDBPIC, OnLoadddbpic)<br />ON_COMMAND(IDM_MARK_DDBPIC, OnMarkDdbpic)<br />ON_COMMAND(IDM_OPENDIBPIC, OnOpendibpic)<br />ON_COMMAND(IDM_MARK_DIBPIC,OnMarkDibpic) //}}AFX_MSG_MAP<br />END_MESSAGE_MAP()</code></p> <p>聽</p> <p> <strong>3. DDB浣嶅浘緙栫▼<br /><br /></strong>鍏堢湅DDB鍔犺澆鎸夐挳鐨勫崟鍑諱簨浠朵唬鐮侊細(xì)<br /><br /><code>void CBitMapExampleDlg::OnLoadddbpic() <br />{<br />1:銆CBitmap bmpDraw;<br />2: bmpDraw.LoadBitmap( IDB_LOADED_BITMAP );//瑁呭叆瑕佸姞杞界殑DDB浣嶅浘 <br />3: BITMAP bmpInfo;<br />4: bmpDraw.GetBitmap( &bmpInfo ); //鑾峰彇瑕佸姞杞紻DB浣嶅浘鐨勫昂瀵?<br />5: CDC memDC;//瀹氫箟涓涓吋瀹笵C<br />6: CClientDC dc( this );<br />7: memDC.CreateCompatibleDC( &dc );//鍒涘緩鍏煎DC<br />8: CBitmap* pbmpOld = memDC.SelectObject( &bmpDraw );//淇濆瓨鍘熸湁DDB錛屽茍閫夊叆鏂癉DB鍏C<br /><br />9: dc.BitBlt( 0, 0, bmpInfo.bmWidth, bmpInfo.bmHeight, &memDC, 0, 0, SRCCOPY );<br /><br />10:銆memDC.SelectObject( pbmpOld );//閫夊叆鍘烡DB<br />}</code><br />涓婅堪浠g爜灝嗕駭鐢熷鍥?鎵紺虹殑鏁堟灉錛屼綅鍥捐瀹夌疆鍦ㄥ璇濇錛?,0錛夊潗鏍囧紑濮嬬殑浣嶇疆涓娿?/p> <p> <img src="http://cimg.163.com/catchpic/F/F8/F8F94958CE8F80443F1BDF1E43BFEA87.jpg" alt="" border="0" /> </p> <p>鍥? 鍔犺澆DDB浣嶅浘璧勬簮</p> <p>聽</p> <p> <br />鎴戜滑鏉ラ愯瑙f瀽涓婅堪浠g爜鏄庢牱浜х敓鍥?鐨勬晥鏋滅殑銆?br /><br />絎?銆?琛屽畾涔変簡(jiǎn)涓涓狢Bitmap瀵硅薄錛屽茍璋冪敤鍏舵垚鍛樺嚱鏁? LoadBitmap鍔犺澆宸ョ▼涓殑浣嶅浘璧勬簮IDB_LOADED_BITMAP銆傜3銆?琛屽畾涔変簡(jiǎn)BITMAP緇撴瀯浣撶殑瀹炰緥騫惰皟鐢–Bitmap鐨勬垚鍛樺嚱 鏁癎etBitmap鑾峰緱浣嶅浘淇℃伅錛孊ITMAP緇撴瀯浣撳畾涔夊湪<wingdi.h></wingdi.h>澶存枃浠朵腑錛屽叾褰㈠紡涓猴細(xì)<br /><br /><code>/* Bitmap Header Definition */<br />typedef struct tagBITMAP<br />{<br />LONG bmType; //蹇呴渶涓?<br />LONG bmWidth; //浣嶅浘鐨勫搴?浠ュ儚绱犱負(fù)鍗曚綅)<br />LONG bmHeight; //浣嶅浘鐨勯珮搴?浠ュ儚绱犱負(fù)鍗曚綅)<br />LONG bmWidthBytes; //姣忎竴鎵弿琛屾墍闇鐨勫瓧鑺傛暟錛屽簲鏄伓鏁?br />WORD bmPlanes; //鑹插鉤闈㈡暟<br />WORD bmBitsPixel; //鑹插鉤闈㈢殑棰滆壊浣嶆暟<br />LPVOID bmBits; //鎸囧悜瀛樺偍鍍忕礌闃靛垪鐨勬暟緇?br />} BITMAP, *PBITMAP, NEAR *NPBITMAP, FAR *LPBITMAP;</code><br />絎?~8琛岀殑浣滅敤鏄細(xì)鏋勫緩涓涓狢DC瀵硅薄錛岃皟鐢–DC::CreateCompatibleDC鍒涘緩涓涓吋瀹圭殑鍐呭瓨璁懼涓婁笅鏂囷紝鎺ョ潃璋冪敤CDC::SelectObject灝咲DB閫夊叆鍐呭瓨璁懼涓婁笅鏂囦腑銆?br /><br />絎?琛岃皟鐢ㄥ嚱鏁癈DC::BitBlt緇樺埗浣嶅浘錛孋DC::BitBlt鐨勫師鍨嬩負(fù)錛?br /><br /><code>CDC::BitBlt(int x, int y, int nWidth, int nHeight, CDC *pSrcDC, int xSrc, int ySrc, DWORD dwRop)</code><br />CDC::BitBlt鎵ц鐨勬搷浣滀負(fù)灝嗘簮DC涓綅鍥懼鍒跺埌鐩殑DC涓傚叾涓墠鍥涗釜鍙傛暟涓虹洰鐨勫尯鍩熺殑鍧愭爣錛坸,y錛夊強(qiáng)闀垮害鍜屽搴︼紙Width, nHeight錛夛紝絎簲涓弬鏁版槸婧怐C鎸囬拡錛屾帴涓嬫潵鐨勫弬鏁版槸婧怐C涓殑璧峰鍧愭爣錛屾渶鍚庝竴涓弬鏁頒負(fù)鍏夋爡鎿嶄綔鐨勭被鍨嬨?br /><br />絎?0琛岃皟鐢–DC::SelectObject鎶婂師鏉ョ殑DDB閫夊叆鍒板唴瀛樿澶囦笂涓嬫枃涓茍浣挎柊DDB鑴辯鍑烘潵銆?br /><br />涓嶤DC::BitBlt瀵瑰簲鐨勮繕鏈夊彟涓涓嚱鏁癈DC::StretchBlt錛屽畠鍏鋒湁緙╂斁鍔熻兘錛屽叾鍘熷瀷涓猴細(xì)<br /><br /><code>BOOL CDC::StretchBlt(int x, int y, int nWidth, int nHeight, CDC *pSrcDC, int<br />xSrc, int ySrc, int nSrcWidth, int nSrcHeight, DWORD dwRop);</code><br />璇ュ嚱鏁版妸浣嶅浘浠庢簮鐭╁艦鎷瘋礉鍒扮洰鐨勭煩褰腑錛屽鏋滄簮鍜岀洰鐨勭煩褰㈠昂瀵鎬笉鍚岋紝閭d箞灝嗙緝鏀句綅鍥劇殑鍔熻兘浠ラ傚簲鐩殑鐭╁艦鐨勫ぇ灝忋傚嚱鏁扮殑澶ч儴鍒嗗弬鏁頒笌BitBlt鐨勭浉鍚岋紝浣嗗浜?jiǎn)涓や釜鍙傛暟nSrcWidth鍜宯SrcHeight鐢ㄦ潵鎸囧畾婧愮煩褰㈢殑瀹藉拰楂樸?br /><br />濡傛灉鎴戜滑灝嗗嚱鏁癈BitMapExampleDlg::OnLoadddbpic() 涓殑絎?琛屾敼涓猴細(xì)<br /><br /><code>CRect clientRect;<br />GetClientRect(&clientRect); //鑾峰緱瀵硅瘽妗嗙獥鍙g殑澶у皬<br />dc.StretchBlt(0, 0, clientRect.right, clientRect.bottom, &memDC, 0, 0,<br />bmpInfo.bmWidth, bmpInfo.bmHeight, SRCCOPY);</code><br />鍒欏崟鍑誨姞杞芥寜閽悗鐨勫璇濇濡傚浘2鎵紺猴紝浣嶅浘琚媺浼歌嚦鏁翠釜瀵硅瘽妗嗙殑鑼冨洿銆?br /></p> <p> <br /> </p> <p align="center"> <img src="http://cimg.163.com/catchpic/4/4F/4F91CC4A105C69E77279A52F4FB2A9EE.jpg" alt="" border="0" /> </p> <p align="center"> <br />鍥? 鎷変幾浣嶅浘<br /></p> <p>CDC::BitBlt鍜宒c.StretchBlt鍑芥暟涓殑dwRop鍙傛暟杈冧負(fù)鏈夌敤錛屽畠瀹氫箟鍏夋爡鎿嶄綔鐨勭被鍨嬨傝鐪?DDB浣嶅浘"鐖惰彍鍗曚笅"鏍囪"瀛愯彍鍗曞崟鍑諱簨浠剁殑娑堟伅澶勭悊鍑芥暟浠g爜錛?br /><br /><code>void CBitMapExampleDlg::OnMarkDdbpic()<br />{<br />CBitmap bmpDraw;<br />bmpDraw.LoadBitmap(IDB_YESKY_BITMAP); //瑁呭叆澶╂瀬緗憀ogo DDB浣嶅浘璧勬簮<br />BITMAP bmpInfo;<br />bmpDraw.GetBitmap(&bmpInfo); //鑾峰彇澶╂瀬緗憀ogo浣嶅浘鐨勫昂瀵?<br /><br />CDC memDC; //瀹氫箟涓涓吋瀹笵C<br />CClientDC dc(this);<br />memDC.CreateCompatibleDC(&dc); //鍒涘緩DC<br /><br />CBitmap *pbmpOld = memDC.SelectObject(&bmpDraw);<br />//淇濆瓨鍘熸湁DDB錛屽茍閫夊叆澶╂瀬緗憀ogo浣嶅浘鍏C<br />dc.BitBlt(0, 0, bmpInfo.bmWidth, bmpInfo.bmHeight, &memDC, 0, 0, SRCAND);<br />memDC.SelectObject(pbmpOld); //閫夊叆鍘烡DB <br />}</code><br />鍗曞嚮璇ユ寜閽悗錛屽皢浜х敓濡傚浘3鐨勬晥鏋滐紝澶╂瀬緗戠殑logo琚忔槑鍦版坊鍔犲埌浜?jiǎn)浣嶅浘涓Q?br /></p> <p> <br /> </p> <p align="center"> <img src="http://cimg.163.com/catchpic/A/AE/AE56DF89FB6B969070E26137BC6C5041.jpg" alt="" border="0" /> </p> <p align="center"> <br />鍥? 鍦―DB浣嶅浘涓姞鍏ュぉ鏋佺綉logo<br /></p> <p>鑳戒駭鐢熻繖涓晥鏋滅殑鍘熷洜鍦ㄤ簬鎴戜滑鍦ㄤ唬鐮佽錛?br /><br /><code>dc.BitBlt ( 0, 0, bmpInfo.bmWidth, bmpInfo.bmHeight, &memDC, 0, 0, SRCAND );</code></p> <p> <code>涓嬌鐢ㄤ簡(jiǎn)鍙傛暟SRCAND錛堜笉鍚屼簬鍏堝墠浠g爜涓璖RCCOPY錛屽畠浠呬粎鎰忓懗鐫澶嶅埗婧愪綅鍥懼埌鐩殑浣嶅浘錛夛紝瀹冪殑鍚箟涓烘簮鍜岀洰鐨勯棿榪涜AND鎿? 浣溿傛垜浠笉鐭ラ亾澶╂瀬緗戠殑緙栬緫鍚屽織鏄庝箞涓烘枃绔犱腑鐨勫浘鐗囧姞logo鐨勶紝鏈夊彲鑳戒粬浠氨浣跨敤浜?jiǎn)鍏锋湁鑷姩AND鍔熻兘鐨勫浘鍍忓姞logo鎵瑰鐞嗚蔣浠躲傜殑紜紝鎴戜滑鍙互鍒? 鐢ㄤ緥紼嬩腑鐨勫師鐞嗗啓涓涓壒澶勭悊杞歡錛屼竴嬈″涓鍫嗗浘鐗囪嚜鍔ㄦ坊鍔爈ogo銆?br /><br />鍙傛暟dwRop闄や簡(jiǎn)鍙互涓篠RCAND鍜孲RCCOPY澶栵紝榪樺彲浠ユ湁濡備笅鍙栧鹼細(xì)<br /><br />BLACKNESS錛氳緭鍑哄尯鍩熶負(fù)榛戣壊<br /><br />DSTINVERT錛氬弽杞洰鐨勪綅鍥?<br /><br />MERGECOPY錛氱敤涓庢搷浣滄妸鍥炬(Pattern)涓庢簮浣嶅浘铻嶅悎璧鋒潵 <br /><br />MERGEPAINT錛氱敤鎴栨搷浣滄妸鍙嶈漿鐨勬簮浣嶅浘涓庣洰鐨勪綅鍥捐瀺鍚堣搗鏉?<br /><br />NOTSRCCOPY錛氭妸婧愪綅鍥懼弽杞劧鍚庢嫹璐濆埌鐩殑鍦?<br /><br />NOTSRCERASE錛氱敤鎴栨搷浣滆瀺鍚堟簮鍜岀洰鐨勪綅鍥撅紝鐒跺悗鍐嶅弽杞?<br /><br />PATCOPY錛氭妸鍥炬鎷瘋礉鍒扮洰鐨勪綅鍥句腑 <br /><br />PATINVERT錛氱敤寮傛垨鎿嶄綔鎶婂浘妗堜笌鐩殑浣嶅浘鐩歌瀺鍚?<br /><br />PATPAINT錛氱敤鎴栨搷浣滆瀺鍚堝浘妗堝拰鍙嶈漿鐨勬簮浣嶅浘錛岀劧鍚庣敤鎴栨搷浣滄妸緇撴灉涓庣洰鐨勪綅鍥捐瀺鍚?<br /><br />SRCERASE錛氬厛鍙嶈漿鐩殑浣嶅浘錛屽啀鐢ㄤ笌鎿嶄綔灝嗗叾涓庢簮浣嶅浘铻嶅悎 <br /><br />SRCINVERT錛氱敤寮傛垨鎿嶄綔铻嶅悎婧愪綅鍥懼拰鐩殑浣嶅浘 <br /><br />SRCPAINT錛氱敤鎴栨搷浣滆瀺鍚堟簮浣嶅浘鍜岀洰鐨勪綅鍥?<br /><br />WHITENESS錛氳緭鍑哄尯鍩熶負(fù)鐧借壊<br /><br />鍚堢悊鍒╃敤榪欎簺鍙栧煎皢甯姪鎴戜滑鍒朵綔鍑虹壒瀹氳姹傜殑鍥懼儚澶勭悊杞歡銆?br /><br />浠庝笂榪板疄渚嬫垜浠彲浠ョ湅鍑猴紝鍦╒C涓嬌鐢–Bitmap綾伙紝蹇呴』灝嗕綅鍥炬斁鍏ュ伐紼嬬殑璧勬簮涓紝騫朵嬌鐢ㄧ被 CBitmap鐨勬垚鍛樺嚱鏁癓oadBitmap鍔犺澆涔嬶紝鍐嶉氳繃CDC綾葷殑鎴愬憳鍑芥暟BitBlt榪涜DC鎷瘋礉絳夋搷浣滆揪鍒版樉紺虹殑鐩殑銆侰Bitmap鏈夋樉紺虹殑涓嶈凍錛?br /><br />錛?錛?浣嶅浘闇瑕佹斁鍏ュ伐紼嬭祫婧愪腑錛岃繖灝嗗鑷村伐紼嬬殑鍙墽琛屾枃浠跺彉澶э紱<br /><br />錛?錛?鍥犱負(fù)浣嶅浘闇鏀懼叆宸ョ▼璧勬簮涓紝鑰岃祫婧愪腑涓嶈兘鏃犵┓鏃犲敖鍦板寘鍚綅鍥撅紝搴旂敤紼嬪簭鏃犳硶鑷傚簲鍦伴夊彇鍏跺畠浣嶅浘錛岃兘浣跨敤鐨勪綅鍥懼崄鍒嗘湁闄愮殑錛?br /><br />錛?錛?綾籆Bitmap鍙槸DDB浣嶅浘鎿嶄綔API鐨勫皝瑁咃紝涓嶈兘鐙珛浜庡鉤鍙般?br /><br />DIB浣嶅浘鍒欏彲浠ヨВ鍐充笂榪伴棶棰橈紝鍏剁壒鐐規(guī)槸浠?BMP浣嶅浘鏂囦歡鏍煎紡瀛樺偍鐙珛浜庡鉤鍙扮殑鍥懼儚鏁版嵁錛屼笅闈㈡垜浠潵璇︾粏鍒嗘瀽銆?br /><strong>4. DIB浣嶅浘緙栫▼<br /><br /></strong>4.1浣嶅浘鏂囦歡鏍煎紡<br /><br />鍏堟潵鍒嗘瀽DIB浣嶅浘鏂囦歡鐨勬牸寮忋備綅鍥炬枃浠跺垎涓哄洓閮ㄥ垎錛?<br /><br />錛?錛変綅鍥炬枃浠跺ごBITMAPFILEHEADER<br /><br />浣嶅浘鏂囦歡澶碆ITMAPFILEHEADER鏄竴涓粨鏋勪綋錛岄暱搴︿負(fù)14瀛楄妭錛屽畾涔変負(fù)錛?br /><br /><code>typedef struct tagBITMAPFILEHEADER<br />{<br />WORD bfType; //鏂囦歡綾誨瀷錛屽繀欏繪槸0x424D錛屽嵆瀛楃涓?BM"<br />DWORD bfSize; //鏂囦歡澶у皬錛屽寘鎷珺ITMAPFILEHEADER鐨?4涓瓧鑺?br />WORD bfReserved1; //淇濈暀瀛?br />WORD bfReserved2; //淇濈暀瀛?br />DWORD bfOffBits; //浠庢枃浠跺ご鍒板疄闄呯殑浣嶅浘鏁版嵁鐨勫亸縐誨瓧鑺傛暟<br />} BITMAPFILEHEADER;</code><br />錛?錛変綅鍥句俊鎭ごBITMAPINFOHEADER<br /><br />浣嶅浘淇℃伅澶碆ITMAPINFOHEADER涔熸槸涓涓粨鏋勪綋錛岄暱搴︿負(fù)40瀛楄妭錛屽畾涔変負(fù)錛?br /><br /><code>typedef struct tagBITMAPINFOHEADER<br />{<br />DWORD biSize; //鏈粨鏋勭殑闀垮害錛屼負(fù)40<br />LONG biWidth; //鍥捐薄鐨勫搴︼紝鍗曚綅鏄薄绱?br />LONG biHeight; //鍥捐薄鐨勯珮搴︼紝鍗曚綅鏄薄绱?br />WORD biPlanes; //蹇呴』鏄?<br />WORD biBitCount;<br />//琛ㄧず棰滆壊鏃惰鐢ㄥ埌鐨勪綅鏁幫紝1(鍗曡壊), 4(16鑹?, 8(256鑹?, 24(鐪熷僵鑹?<br />DWORD biCompression;<br />//鎸囧畾浣嶅浘鏄惁鍘嬬緝錛屾湁鏁堢殑鍊間負(fù)BI_RGB錛孊I_RLE8錛孊I_RLE4錛孊I_BITFIELDS絳夛紝BI_RGB琛ㄧず涓嶅帇緙?br />DWORD biSizeImage;<br />//瀹為檯鐨勪綅鍥炬暟鎹崰鐢ㄧ殑瀛楄妭鏁幫紝鍗?biSizeImage=biWidth鈥?脳 biHeight錛宐iWidth鈥欐槸biWidth 鎸夌収4鐨勬暣鍊嶆暟璋冩暣鍚庣殑緇撴灉 <br />LONG biXPelsPerMeter; //鐩爣璁懼鐨勬按騫沖垎杈ㄧ巼錛屽崟浣嶆槸姣忕背鐨勮薄绱犱釜鏁?br />LONG biYPelsPerMeter; //鐩爣璁懼鐨勫瀭鐩村垎杈ㄧ巼錛屽崟浣嶆槸姣忕背鐨勮薄绱犱釜鏁?br />DWORD biClrUsed; //浣嶅浘瀹為檯鐢ㄥ埌鐨勯鑹叉暟錛?琛ㄧず棰滆壊鏁頒負(fù)2biBitCount<br />DWORD biClrImportant; //浣嶅浘涓噸瑕佺殑棰滆壊鏁幫紝0琛ㄧず鎵鏈夐鑹查兘閲嶈<br />} BITMAPINFOHEADER;</code><br />錛?錛夎皟鑹叉澘Palette<br /><br />璋? 鑹叉澘Palette閽堝鐨勬槸闇瑕佽皟鑹叉澘鐨勪綅鍥撅紝鍗沖崟鑹層?6鑹插拰256鑹蹭綅鍥俱傚浜庝笉浠ヨ皟鑹叉澘鏂瑰紡瀛樺偍鐨勪綅鍥撅紝鍒欐棤姝ら」淇℃伅銆傝皟鑹叉澘鏄竴涓暟緇勶紝鍏辨湁 biClrUsed涓厓绱?濡傛灉璇ュ間負(fù)0錛屽垯鏈?biBitCount涓厓绱?銆傛暟緇勪腑姣忎釜鍏冪礌鏄竴涓猂GBQUAD緇撴瀯浣擄紝闀垮害涓?涓瓧鑺傦紝瀹氫箟涓猴細(xì)<br /><br /><code>typedef struct tagRGBQUAD<br />{<br />BYTE rgbBlue; //钃濊壊鍒嗛噺<br />BYTE rgbGreen; //緇胯壊鍒嗛噺<br />BYTE rgbRed; //綰㈣壊鍒嗛噺<br />BYTE rgbReserved; //淇濈暀鍊?br />} RGBQUAD;</code></code> </p> <p> <code> <code>錛?錛夊疄闄呯殑浣嶅浘鏁版嵁ImageDate<br /><br />瀵逛簬鐢ㄥ埌璋冭壊鏉跨殑浣嶅浘錛屽疄闄呯殑鍥捐薄鏁版嵁ImageDate涓鴻璞$礌鐨勯鑹插湪璋冭壊鏉夸腑鐨勭儲(chǔ)寮曞鹼紱瀵逛簬鐪熷僵鑹插浘錛屽浘璞℃暟鎹垯涓哄疄闄呯殑R銆丟銆丅鍊鹼細(xì)<br /><br />a.鍗曡壊浣嶅浘錛氱敤1bit灝卞彲浠ヨ〃紺鴻薄绱犵殑棰滆壊绱㈠紩鍊鹼紱<br /><br />b.16鑹蹭綅鍥撅細(xì)鐢?bit鍙互琛ㄧず璞$礌鐨勯鑹茬儲(chǔ)寮曞鹼紱<br /><br />c. 256鑹蹭綅鍥撅細(xì)1涓瓧鑺傝〃紺?涓薄绱犵殑棰滆壊绱㈠紩鍊鹼紱 <br /><br />d.鐪熷僵鑹詫細(xì)3涓瓧鑺傝〃紺?涓薄绱犵殑棰滆壊R錛孏錛孊鍊箋?br /><br />姝ゅ錛屼綅鍥炬暟鎹瘡涓琛岀殑瀛楄妭鏁板繀欏諱負(fù)4鐨勬暣鍊嶆暟錛屽鏋滀笉鏄紝鍒欓渶瑕佽ˉ榻愩傚鎬殑鏄紝浣嶅浘鏂囦歡涓殑鏁版嵁鏄粠涓嬪埌涓婏紙鑰屼笉鏄粠涓婂埌涓嬶級(jí)銆佷粠宸﹀埌鍙蟲柟寮忓瓨鍌ㄧ殑銆?br />4.2浣嶅浘鐨勬樉紺?br /><br />Visual C++ MFC涓病鏈夋彁渚涗竴涓笓闂ㄧ殑綾繪潵澶勭悊DIB浣嶅浘錛屽洜姝わ紝涓轟簡(jiǎn)鏂逛究鍦頒嬌鐢ㄤ綅鍥炬枃浠訛紝鎴戜滑鏈夊繀瑕佹淳鐢熶竴涓狢Dib綾匯傜被鐨勬簮浠g爜濡備笅錛?br /><br />(1) CDib綾葷殑澹版槑<br /><br /><code>// DIB.h錛氱被CDib澹版槑澶存枃浠?br />#ifndef __DIB_H__<br />#define __DIB_H__<br />#include <wingdi.h></wingdi.h><br />class CDib<br />{<br />public:<br />CDib();<br />~CDib();<br /><br />BOOL Load( const char * );<br />BOOL Save( const char * );<br />BOOL Draw( CDC *, int nX = 0, int nY = 0, int nWidth = -1, int nHeight = -1, int mode = SRCCOPY);<br />BOOL SetPalette( CDC * );<br /><br />private:<br />CPalette m_Palette;<br />unsigned char *m_pDib, *m_pDibBits;<br />DWORD m_dwDibSize;<br />BITMAPINFOHEADER *m_pBIH;<br />RGBQUAD *m_pPalette;<br />int m_nPaletteEntries;<br />};<br />#endif<br /></code><br />(2) CDib綾葷殑瀹炵幇<br /><br /><code>// DIB.cpp錛氱被CDib瀹炵幇鏂囦歡<br />#include "stdafx.h"<br />#include "DIB.h"<br /><br />CDib::CDib()<br />{<br />m_pDib = NULL;<br />}<br /><br />CDib::~CDib()<br />{<br />// 濡傛灉浣嶅浘宸茬粡琚姞杞斤紝閲婃斁鍐呭瓨<br />if (m_pDib != NULL)<br />delete []m_pDib;<br />}</code><br />涓嬮潰榪欎釜鍑芥暟闈炲父閲嶈錛屽叾鍔熻兘涓哄姞杞戒綅鍥撅紝綾諱技浜嶤Bitmap綾葷殑LoadBitmap鍑芥暟錛?br /><br /><code>BOOL CDib::Load(const char *pszFilename)<br />{<br />CFile cf;<br /><br />// 鎵撳紑浣嶅浘鏂囦歡<br />if (!cf.Open(pszFilename, CFile::modeRead))<br />return (FALSE);<br /><br />// 鑾峰緱浣嶅浘鏂囦歡澶у皬錛屽茍鍑忓幓BITMAPFILEHEADER鐨勯暱搴?br />DWORD dwDibSize;<br />dwDibSize = cf.GetLength() - sizeof(BITMAPFILEHEADER);<br /><br />// 涓篋IB浣嶅浘鍒嗛厤鍐呭瓨<br />unsigned char *pDib;<br />pDib = new unsigned char[dwDibSize];<br />if (pDib == NULL)<br />return (FALSE);<br /><br />BITMAPFILEHEADER BFH;<br /><br />// 璇誨彇浣嶅浘鏂囦歡鏁版嵁<br />try<br />{<br />// 鏂囦歡鏍煎紡鏄惁姝g‘鏈夋晥<br />if ( cf.Read(&BFH, sizeof(BITMAPFILEHEADER)) != sizeof(BITMAPFILEHEADER) ||<br />BFH.bfType != 鈥橫B鈥?|| cf.Read(pDib, dwDibSize) != dwDibSize)<br />{<br />delete []pDib;<br />return (FALSE);<br />}<br />}<br />catch (CFileException *e)<br />{<br />e->Delete();<br />delete []pDib;<br />return (FALSE);<br />}<br /><br />// delete鍏堝墠鍔犺澆鐨勪綅鍥?br />if (m_pDib != NULL) <br />delete m_pDib;<br /><br />// 灝嗕復(fù)鏃禗ib鏁版嵁鎸囬拡鍜孌ib澶у皬鍙橀噺璧嬬粰綾繪垚鍛樺彉閲?br />m_pDib = pDib;<br />m_dwDibSize = dwDibSize;<br /><br />// 涓虹浉搴旂被鎴愬憳鍙橀噺璧婤ITMAPINFOHEADER鍜岃皟鑹叉澘鎸囬拡<br />m_pBIH = (BITMAPINFOHEADER*)m_pDib;<br />m_pPalette = (RGBQUAD*) &m_pDib[sizeof(BITMAPINFOHEADER)];<br /><br />// 璁$畻璋冭壊鏉夸腑瀹為檯棰滆壊鏁伴噺<br />m_nPaletteEntries = 1 << m_pBIH->biBitCount;<br />if (m_pBIH->biBitCount >8)<br />m_nPaletteEntries = 0;<br />else if (m_pBIH->biClrUsed != 0)<br />m_nPaletteEntries = m_pBIH->biClrUsed;<br /><br />// 涓虹浉搴旂被鎴愬憳鍙橀噺璧媔mage data鎸囬拡<br />m_pDibBits = &m_pDib[sizeof(BITMAPINFOHEADER) + m_nPaletteEntries * sizeof (RGBQUAD)];<br /><br />// delete鍏堝墠鐨勮皟鑹叉澘<br />if (m_Palette.GetSafeHandle() != NULL)<br />m_Palette.DeleteObject();<br /><br />// 濡傛灉浣嶅浘涓瓨鍦ㄨ皟鑹叉澘錛屽垱寤篖OGPALETTE 鍙?qiáng)CPalette<br />if (m_nPaletteEntries != 0)<br />{<br />LOGPALETTE *pLogPal = (LOGPALETTE*)new char[sizeof(LOGPALETTE) + m_nPaletteEntries *sizeof(PALETTEENTRY)];<br /><br />if (pLogPal != NULL)<br />{<br />pLogPal->palVersion = 0x300;<br />pLogPal->palNumEntries = m_nPaletteEntries;<br /><br />for (int i = 0; i < m_nPaletteEntries; i++)<br />{<br />pLogPal->palPalEntry[i].peRed = m_pPalette[i].rgbRed;<br />pLogPal->palPalEntry[i].peGreen = m_pPalette[i].rgbGreen;<br />pLogPal->palPalEntry[i].peBlue = m_pPalette[i].rgbBlue;<br />}<br /><br />//鍒涘緩CPalette騫墮噴鏀綥OGPALETTE鐨勫唴瀛?br />m_Palette.CreatePalette(pLogPal);<br />delete []pLogPal;<br />}<br />}<br /><br />return (TRUE);<br />}<br /><br />//鍑芥暟鍔熻兘錛氫繚瀛樹綅鍥懼叆BMP鏂囦歡<br />BOOL CDib::Save(const char *pszFilename)<br />{<br />if (m_pDib == NULL)<br />return (FALSE);<br /><br />CFile cf;<br />if (!cf.Open(pszFilename, CFile::modeCreate | CFile::modeWrite))<br />return (FALSE);<br /><br />try<br />{<br />BITMAPFILEHEADER BFH;<br />memset(&BFH, 0, sizeof(BITMAPFILEHEADER));<br />BFH.bfType = 鈥橫B鈥?<br />BFH.bfSize = sizeof(BITMAPFILEHEADER) + m_dwDibSize;<br />BFH.bfOffBits = sizeof(BITMAPFILEHEADER) + <br />sizeof(BITMAPINFOHEADER) + m_nPaletteEntries *sizeof(RGBQUAD);<br /><br />cf.Write(&BFH, sizeof(BITMAPFILEHEADER));<br />cf.Write(m_pDib, m_dwDibSize);<br />}<br />catch (CFileException *e)<br />{<br />e->Delete();<br />return (FALSE);<br />}<br />return (TRUE);<br />}</code><br />涓嬮潰榪欎釜鍑芥暟涔熼潪甯擱噸瑕侊紝鍏跺姛鑳戒負(fù)鍦╬DC鎸囧悜鐨凜DC涓粯鍒朵綅鍥撅紝璧風(fēng)偣鍧愭爣涓?nX,nY)錛岀粯鍒跺搴﹀拰楂樺害涓簄Width銆乶Height錛屾渶鍚庝竴涓弬鏁版槸鍏夋爡妯″紡錛?br /><br /><code>BOOL CDib::Draw(CDC *pDC, int nX, int nY, int nWidth, int nHeight, int mode)<br />{<br />if (m_pDib == NULL)<br />return (FALSE);<br /><br />// 鑾峰彇浣嶅浘瀹藉害鍜岄珮搴﹁祴鍊?br />if (nWidth == - 1)<br />nWidth = m_pBIH->biWidth;<br />if (nHeight == - 1)<br />nHeight = m_pBIH->biHeight;<br /><br />// 緇樺埗浣嶅浘<br />StretchDIBits(pDC->m_hDC, nX, nY, nWidth, nHeight, 0, 0, m_pBIH->biWidth, m_pBIH->biHeight, m_pDibBits, (BITMAPINFO*)m_pBIH, BI_RGB, mode);<br /><br />return (TRUE);<br />}<br /><br />//鍑芥暟鍔熻兘錛氳緗皟鑹叉澘<br />BOOL CDib::SetPalette(CDC *pDC)<br />{<br />if (m_pDib == NULL)<br />return (FALSE);<br /><br />// 媯(gè)鏌ュ綋鍓嶆槸鍚︽湁涓涓皟鑹叉澘鍙ユ焺錛屽浜庡ぇ浜?56鑹茬殑浣嶅浘錛屼負(fù)NULL<br />if (m_Palette.GetSafeHandle() == NULL)<br />return (TRUE);<br /><br />// 閫夋嫨璋冭壊鏉匡紝鎺ョ潃瀹炴柦涔嬶紝鏈鍚庢仮澶嶈佺殑璋冭壊鏉?br />CPalette *pOldPalette;<br />pOldPalette = pDC->SelectPalette(&m_Palette, FALSE);<br />pDC->RealizePalette();<br />pDC->SelectPalette(pOldPalette, FALSE);<br /><br />return (TRUE);<br />}</code><br />浠庢暣涓狢Dib綾葷殑浠g爜涓垜浠彲浠ョ湅鍑猴紝DIB浣嶅浘鐨勬樉紺洪渶閬靛驚濡備笅姝ラ錛?br /><br />錛?錛夎鍙栦綅鍥撅紝鏈被涓嬌鐢╬Dib = new unsigned char[dwDibSize]涓轟綅鍥句腑鐨勪俊鎭垎閰嶅唴瀛橈紝鍙︿竴縐嶆柟娉曟槸璋冪敤API鍑芥暟CreateDIBSection錛岃濡傦細(xì)<br /><br /><code>m_hBitmap = ::CreateDIBSection(pDC->GetSafeHdc(), <br />(LPBITMAPINFO) m_lpBMPHdr, DIB_RGB_COLORS,<br />(LPVOID*) &m_lpDIBits, NULL, 0);</code><br />m_hBitmap瀹氫箟涓猴細(xì)<br /><br /><code>HBITMAP m_hBitmap;</code><br />錛?錛夋牴鎹鍙栫殑浣嶅浘淇℃伅錛岃綆楀嚭璋冭壊鏉垮ぇ灝忥紝鐒跺悗鍒涘緩璋冭壊鏉匡紱<br /><br />錛?錛夎皟鐢–Dib::SetPalette( CDC *pDC )璁劇疆璋冭壊鏉匡紝闇瑕佺敤鍒癈DC::SelectPalette鍙?qiáng)CDC::RealizePalette涓や釜鍑芥暟錛?br /><br />錛?錛? 璋冪敤CDib::Draw(CDC *pDC, int nX, int nY, int nWidth, int nHeight, int mode)鍑芥暟緇樺埗浣嶅浘銆傚湪姝ゅ嚱鏁頒腑錛岀湡姝e彂鎸ユ樉紺轟綅鍥句綔鐢ㄧ殑鏄StretchDIBits API鍑芥暟鐨勮皟鐢ㄣ係tretchDIBits鍑芥暟鍏鋒湁緙╂斁鍔熻兘錛屽叾鏈鍚庝竴涓弬鏁頒篃鏄厜鏍呮搷浣滅殑妯″紡銆?br /><br />涓嬮潰緇欏嚭DIB浣嶅浘鐨勬墦寮鍙?qiáng)鏄窘C哄茍鍦ㄥ叾涓姞鍏ュぉ鏋佺綉logo鐨勫嚱鏁版簮浠g爜銆?DIB浣嶅浘"鐖惰彍鍗曚笅"鎵撳紑"瀛愯彍鍗曠殑鍗曞嚮浜嬩歡娑堟伅澶勭悊鍑芥暟涓猴紙鍏跺姛鑳戒負(fù)鎵撳紑浣嶅浘騫舵樉紺轟箣錛夛細(xì) <br /><br /><code>void CBitMapExampleDlg::OnOpendibpic()<br />{<br />// 寮瑰嚭鏂囦歡瀵硅瘽妗嗭紝璁╃敤鎴烽夋嫨浣嶅浘鏂囦歡<br />CFileDialog fileDialog(TRUE, "*.BMP", NULL, NULL,"浣嶅浘鏂囦歡(*.BMP)|*.bmp;*.BMP|");<br />if (IDOK == fileDialog.DoModal())<br />{<br />// 鍔犺澆浣嶅浘騫舵樉紺轟箣<br />CDib dib;<br />if (dib.Load(fileDialog.GetPathName()))<br />{<br />CClientDC dc(this);<br />dib.SetPalette(&dc);<br />dib.Draw(&dc);<br />}<br />}<br />}</code><br />"DIB浣嶅浘"鐖惰彍鍗曚笅"鏍囪"瀛愯彍鍗曠殑鍗曞嚮浜嬩歡娑堟伅澶勭悊鍑芥暟涓猴紙鍏跺姛鑳戒負(fù)緇欎綅鍥懼姞涓婂ぉ鏋佺綉logo錛夛細(xì)<br /><br /><code>void CBitMapExampleDlg::OnMarkDibpic()<br />{<br />// 寮瑰嚭鏂囦歡瀵硅瘽妗嗭紝璁╃敤鎴烽夋嫨鏍囪l(fā)ogo<br />CFileDialog fileDialog(TRUE, "*.BMP", NULL, NULL, "鏍囪浣嶅浘鏂囦歡(*.BMP)|*.bmp;*.BMP|");<br />if (IDOK == fileDialog.DoModal())<br />{<br />// 鍔犺澆鏍囪l(fā)ogo浣嶅浘騫朵笌鐩爣浣嶅浘鐩鎬笌<br />CDib dib;<br />if (dib.Load(fileDialog.GetPathName()))<br />{<br />CClientDC dc(this);<br />dib.SetPalette(&dc);<br />dib.Draw(&dc, 0, 0, - 1, - 1, SRCAND);<br />}<br />}<br />}</code><br />鍥?鏄劇ず浜?jiǎn)DIB浣嶅浘鍔犺澆澶╂瀬緗憀ogo鍚庣殑鏁堟灉錛岃濂戒簬鍥?涓姞澶╂瀬緗憀ogo鍚庣殑DDB浣嶅浘銆傚浘4鏄劇ず鐨勬槸鐪熷僵鑹蹭綅鍥劇浉浜掍笌鐨勭粨鏋滐紝鑰屽浘3涓殑鍥懼儚棰滆壊琚噺灝戜簡(jiǎn)銆?br /><br /></code> </code> </p> <p align="center"> <img src="http://cimg.163.com/catchpic/E/E6/E683A3F6D12F0BFB25E9FC01B42FAC52.jpg" alt="" border="0" /> </p> <p align="center"> <br />鍥? 鍦―IB浣嶅浘涓姞鍏ュぉ鏋佺綉logo<br /></p> <strong> </strong> <p> <strong>5. 緇撴潫璇?br /></strong> <br />鏈枃浠嬬粛浜?jiǎn)浣嶅洃謴?qiáng)璋冭壊鏉跨殑姒傚康錛屽茍璁茶В浜?jiǎn)DDB浣嶅浘涓嶥IB浣嶅浘鐨勫尯鍒傚湪姝ゅ熀紜 涓婏紝鏈枃浠ュ疄渚嬭瑙d簡(jiǎn)DDB浣嶅浘鍜孌IB浣嶅浘鐨勬搷浣滄柟寮忋侱DB浣嶅浘鐨勫鐞嗙浉瀵規(guī)瘮杈冪畝鍗曪紝瀵逛簬DIB浣嶅浘錛屾垜浠渶瑕佸畾涔変竴涓狹FC鎵娌℃湁鐨勬柊綾籆Dib錛? 瀹冨睆钄戒綅鍥句俊鎭殑璇誨彇鍙?qiáng)璋冭壊鏉垮垱寰忕殑鎶鏈粏鑺傦紝搴旂敤紼嬪簭鍙互鏂逛究鍦頒嬌鐢ㄤ箣銆?br /><br />鏈枃涓殑鎵鏈夌▼搴忓湪Visual C++6.0鍙?qiáng)Windows XP騫沖彴涓婅皟璇曢氳繃銆?/p> <img src ="http://m.shnenglu.com/swo2006/aggbug/10980.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.shnenglu.com/swo2006/" target="_blank">swo</a> 2006-08-08 13:00 <a href="http://m.shnenglu.com/swo2006/articles/10980.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item></channel></rss> <a href="http://m.shnenglu.com/">青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品</a> <div style="position:fixed;left:-9000px;top:-9000px;"><font id="pjuwb"></font><button id="pjuwb"><pre id="pjuwb"></pre></button><sub id="pjuwb"></sub><tbody id="pjuwb"><var id="pjuwb"><address id="pjuwb"></address></var></tbody><listing id="pjuwb"><label id="pjuwb"><strong id="pjuwb"></strong></label></listing><wbr id="pjuwb"><small id="pjuwb"><tbody id="pjuwb"></tbody></small></wbr><ins id="pjuwb"><xmp id="pjuwb"></xmp></ins><style id="pjuwb"></style><label id="pjuwb"><em id="pjuwb"><li id="pjuwb"></li></em></label><samp id="pjuwb"></samp><menu id="pjuwb"><input id="pjuwb"></input></menu><pre id="pjuwb"><tbody id="pjuwb"><tfoot id="pjuwb"><button id="pjuwb"></button></tfoot></tbody></pre><form id="pjuwb"></form><i id="pjuwb"><style id="pjuwb"><label id="pjuwb"><sup id="pjuwb"></sup></label></style></i><li id="pjuwb"><table id="pjuwb"><abbr id="pjuwb"></abbr></table></li><video id="pjuwb"></video><dfn id="pjuwb"></dfn><progress id="pjuwb"></progress><strong id="pjuwb"></strong><mark id="pjuwb"></mark><em id="pjuwb"></em><tbody id="pjuwb"><p id="pjuwb"><strike id="pjuwb"><acronym id="pjuwb"></acronym></strike></p></tbody><option id="pjuwb"></option><strike id="pjuwb"></strike><u id="pjuwb"></u><td id="pjuwb"><center id="pjuwb"><tr id="pjuwb"></tr></center></td><em id="pjuwb"><mark id="pjuwb"><em id="pjuwb"><tt id="pjuwb"></tt></em></mark></em><strong id="pjuwb"></strong><wbr id="pjuwb"></wbr><s id="pjuwb"></s><strong id="pjuwb"></strong><legend id="pjuwb"></legend><nav id="pjuwb"></nav><dl id="pjuwb"><th id="pjuwb"><dl id="pjuwb"></dl></th></dl><noframes id="pjuwb"><ins id="pjuwb"></ins></noframes><font id="pjuwb"></font><strike id="pjuwb"><i id="pjuwb"><style id="pjuwb"><label id="pjuwb"></label></style></i></strike><output id="pjuwb"></output><thead id="pjuwb"><pre id="pjuwb"></pre></thead><source id="pjuwb"></source><menuitem id="pjuwb"><wbr id="pjuwb"></wbr></menuitem><pre id="pjuwb"><span id="pjuwb"><pre id="pjuwb"><big id="pjuwb"></big></pre></span></pre><cite id="pjuwb"><fieldset id="pjuwb"><s id="pjuwb"><rt id="pjuwb"></rt></s></fieldset></cite><big id="pjuwb"><progress id="pjuwb"><big id="pjuwb"></big></progress></big><samp id="pjuwb"><delect id="pjuwb"></delect></samp><dl id="pjuwb"></dl><strike id="pjuwb"><nav id="pjuwb"><dl id="pjuwb"><strong id="pjuwb"></strong></dl></nav></strike><tbody id="pjuwb"><b id="pjuwb"><optgroup id="pjuwb"><rp id="pjuwb"></rp></optgroup></b></tbody><em id="pjuwb"></em><xmp id="pjuwb"><blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote></xmp> <i id="pjuwb"><abbr id="pjuwb"><i id="pjuwb"><abbr id="pjuwb"></abbr></i></abbr></i><center id="pjuwb"><acronym id="pjuwb"><center id="pjuwb"></center></acronym></center><pre id="pjuwb"></pre><ul id="pjuwb"><thead id="pjuwb"></thead></ul><blockquote id="pjuwb"><pre id="pjuwb"><sup id="pjuwb"></sup></pre></blockquote><acronym id="pjuwb"></acronym><big id="pjuwb"><s id="pjuwb"></s></big><th id="pjuwb"></th><th id="pjuwb"></th><tbody id="pjuwb"></tbody><thead id="pjuwb"><strike id="pjuwb"></strike></thead><th id="pjuwb"><dl id="pjuwb"><wbr id="pjuwb"></wbr></dl></th><dl id="pjuwb"><strong id="pjuwb"></strong></dl><abbr id="pjuwb"><noframes id="pjuwb"><noscript id="pjuwb"></noscript></noframes></abbr><td id="pjuwb"><ol id="pjuwb"></ol></td><li id="pjuwb"><noscript id="pjuwb"><abbr id="pjuwb"></abbr></noscript></li><small id="pjuwb"><bdo id="pjuwb"><nav id="pjuwb"></nav></bdo></small><style id="pjuwb"></style><optgroup id="pjuwb"><table id="pjuwb"></table></optgroup><center id="pjuwb"><tr id="pjuwb"><dfn id="pjuwb"></dfn></tr></center><th id="pjuwb"></th><u id="pjuwb"></u><tfoot id="pjuwb"><legend id="pjuwb"><i id="pjuwb"></i></legend></tfoot><mark id="pjuwb"></mark><meter id="pjuwb"></meter><nav id="pjuwb"></nav><acronym id="pjuwb"><pre id="pjuwb"><acronym id="pjuwb"><ul id="pjuwb"></ul></acronym></pre></acronym><acronym id="pjuwb"><pre id="pjuwb"><acronym id="pjuwb"><ul id="pjuwb"></ul></acronym></pre></acronym><nobr id="pjuwb"></nobr><sub id="pjuwb"><th id="pjuwb"><menuitem id="pjuwb"><wbr id="pjuwb"></wbr></menuitem></th></sub><thead id="pjuwb"><sub id="pjuwb"></sub></thead><ul id="pjuwb"><address id="pjuwb"><menuitem id="pjuwb"><meter id="pjuwb"></meter></menuitem></address></ul><dfn id="pjuwb"></dfn><pre id="pjuwb"></pre><input id="pjuwb"><cite id="pjuwb"><fieldset id="pjuwb"></fieldset></cite></input><u id="pjuwb"><form id="pjuwb"><u id="pjuwb"></u></form></u><kbd id="pjuwb"><em id="pjuwb"><mark id="pjuwb"></mark></em></kbd><tr id="pjuwb"></tr><del id="pjuwb"><form id="pjuwb"><address id="pjuwb"></address></form></del><tfoot id="pjuwb"><legend id="pjuwb"><ol id="pjuwb"><dl id="pjuwb"></dl></ol></legend></tfoot><menu id="pjuwb"><nobr id="pjuwb"><th id="pjuwb"><nobr id="pjuwb"></nobr></th></nobr></menu><fieldset id="pjuwb"></fieldset><pre id="pjuwb"><blockquote id="pjuwb"><samp id="pjuwb"></samp></blockquote></pre><xmp id="pjuwb"><sup id="pjuwb"><pre id="pjuwb"></pre></sup></xmp><span id="pjuwb"><progress id="pjuwb"></progress></span><font id="pjuwb"></font><var id="pjuwb"><abbr id="pjuwb"></abbr></var><strong id="pjuwb"><label id="pjuwb"><i id="pjuwb"><legend id="pjuwb"></legend></i></label></strong><tr id="pjuwb"><em id="pjuwb"><em id="pjuwb"><output id="pjuwb"></output></em></em></tr><thead id="pjuwb"><strike id="pjuwb"></strike></thead> <acronym id="pjuwb"></acronym><i id="pjuwb"></i><tt id="pjuwb"></tt><rt id="pjuwb"><source id="pjuwb"><rt id="pjuwb"></rt></source></rt><strike id="pjuwb"><acronym id="pjuwb"></acronym></strike><del id="pjuwb"></del><font id="pjuwb"><output id="pjuwb"><ins id="pjuwb"><output id="pjuwb"></output></ins></output></font><kbd id="pjuwb"><tr id="pjuwb"><kbd id="pjuwb"></kbd></tr></kbd><pre id="pjuwb"><sup id="pjuwb"><delect id="pjuwb"><samp id="pjuwb"></samp></delect></sup></pre><samp id="pjuwb"></samp><track id="pjuwb"></track><tr id="pjuwb"></tr><center id="pjuwb"></center><fieldset id="pjuwb"></fieldset><i id="pjuwb"></i><td id="pjuwb"></td><rt id="pjuwb"></rt><object id="pjuwb"></object><pre id="pjuwb"><progress id="pjuwb"><sub id="pjuwb"><thead id="pjuwb"></thead></sub></progress></pre><kbd id="pjuwb"><tr id="pjuwb"><option id="pjuwb"></option></tr></kbd><output id="pjuwb"><ins id="pjuwb"></ins></output><ol id="pjuwb"></ol><source id="pjuwb"></source><strong id="pjuwb"></strong><ruby id="pjuwb"></ruby><sub id="pjuwb"><meter id="pjuwb"><menuitem id="pjuwb"><meter id="pjuwb"></meter></menuitem></meter></sub><pre id="pjuwb"></pre><center id="pjuwb"></center><tr id="pjuwb"><tbody id="pjuwb"><xmp id="pjuwb"><dd id="pjuwb"></dd></xmp></tbody></tr><video id="pjuwb"></video><pre id="pjuwb"></pre><form id="pjuwb"><optgroup id="pjuwb"></optgroup></form><samp id="pjuwb"></samp><kbd id="pjuwb"></kbd><strong id="pjuwb"><option id="pjuwb"></option></strong><object id="pjuwb"></object><abbr id="pjuwb"><noframes id="pjuwb"><abbr id="pjuwb"></abbr></noframes></abbr><ul id="pjuwb"><del id="pjuwb"><button id="pjuwb"><pre id="pjuwb"></pre></button></del></ul><abbr id="pjuwb"></abbr><strong id="pjuwb"><code id="pjuwb"><strong id="pjuwb"></strong></code></strong><option id="pjuwb"></option><optgroup id="pjuwb"><bdo id="pjuwb"><code id="pjuwb"></code></bdo></optgroup><mark id="pjuwb"><em id="pjuwb"><font id="pjuwb"></font></em></mark><acronym id="pjuwb"><code id="pjuwb"></code></acronym><dl id="pjuwb"></dl><em id="pjuwb"></em><object id="pjuwb"><input id="pjuwb"><object id="pjuwb"></object></input></object><output id="pjuwb"><dd id="pjuwb"></dd></output><option id="pjuwb"><button id="pjuwb"><option id="pjuwb"></option></button></option><small id="pjuwb"></small></div> <a href="http://zytxkj.com" target="_blank">欧美护士18xxxxhd</a>| <a href="http://xy3977.com" target="_blank">欧美日韩国产黄</a>| <a href="http://xprinter3d.com" target="_blank">91久久午夜</a>| <a href="http://yeepey.com" target="_blank">奶水喷射视频一区</a>| <a href="http://916969.com" target="_blank">欧美国产日韩精品</a>| <a href="http://cnchtx.com" target="_blank">日韩视频一区二区在线观看</a>| <a href="http://musicshq.com" target="_blank">亚洲激情av</a>| <a href="http://ez4444.com" target="_blank">中文在线资源观看网站视频免费不卡</a>| <a href="http://977764.com" target="_blank">一本一本久久a久久精品综合妖精</a>| <a href="http://aqdav037.com" target="_blank">亚洲免费观看在线观看</a>| <a href="http://www-132377.com" target="_blank">亚洲视频视频在线</a>| <a href="http://nn99dd.com" target="_blank">亚洲欧美变态国产另类</a>| <a href="http://wwwmiya118.com" target="_blank">亚洲一区制服诱惑</a>| <a href="http://zisxks.com" target="_blank">国产精品高潮呻吟久久av黑人</a>| <a href="http://www55747.com" target="_blank">欧美精品在线观看播放</a>| <a href="http://0855dyw.com" target="_blank">国产精品人人做人人爽</a>| <a href="http://by3180.com" target="_blank">激情五月***国产精品</a>| <a href="http://s0247.com" target="_blank">av成人动漫</a>| <a href="http://by4425.com" target="_blank">老司机精品福利视频</a>| <a href="http://yiqipapa8.com" target="_blank">亚洲福利国产精品</a>| <a href="http://mengmujia.com" target="_blank">亚洲欧美电影在线观看</a>| <a href="http://www-23918.com" target="_blank">欧美jizz19性欧美</a>| <a href="http://essuee.com" target="_blank">国产一区二区三区久久</a>| <a href="http://19zet.com" target="_blank">宅男66日本亚洲欧美视频 </a>| <a href="http://xyyssa.com" target="_blank">一区二区视频在线观看</a>| <a href="http://862323.com" target="_blank">99精品视频免费观看视频</a>| <a href="http://chaoxibg.com" target="_blank">欧美在线观看天堂一区二区三区 </a>| <a href="http://wxsanyuan.com" target="_blank">老司机免费视频一区二区</a>| <a href="http://lovehefei.com" target="_blank">亚洲国产精品福利</a>| <a href="http://777777hb.com" target="_blank">午夜精品视频在线</a>| <a href="http://www-888690.com" target="_blank">欧美日本免费</a>| <a href="http://vvvv81.com" target="_blank">亚洲国产精品久久91精品</a>| <a href="http://sortxz.com" target="_blank">午夜精品久久久久久久99黑人</a>| <a href="http://playav111.com" target="_blank">蜜月aⅴ免费一区二区三区</a>| <a href="http://shyihegu.com" target="_blank">亚洲性视频h</a>| <a href="http://0855123.com" target="_blank">欧美剧在线观看</a>| <a href="http://244223.com" target="_blank">在线看片一区</a>| <a href="http://luobu520.com" target="_blank">久久精品一本久久99精品</a>| <a href="http://essuee.com" target="_blank">日韩一级在线</a>| <a href="http://www66617.com" target="_blank">欧美韩国一区</a>| <a href="http://y77778.com" target="_blank">亚洲国内精品在线</a>| <a href="http://bdkaoyan.com" target="_blank">玖玖玖免费嫩草在线影院一区</a>| <a href="http://jxyptsw.com" target="_blank">亚洲综合999</a>| <a href="http://mm778899.com" target="_blank">国产精品久久久久9999</a>| <a href="http://017455.com" target="_blank">亚洲一级黄色av</a>| <a href="http://3848404.com" target="_blank">99riav国产精品</a>| <a href="http://080973.com" target="_blank">欧美日韩国产一区</a>| <a href="http://4bbbbb.com" target="_blank">日韩一区二区高清</a>| <a href="http://jm1688e.com" target="_blank">另类专区欧美制服同性</a>| <a href="http://92y5.com" target="_blank">亚洲欧美日韩一区二区三区在线观看</a>| <a href="http://spvicarb.com" target="_blank">男女精品网站</a>| <a href="http://339871.com" target="_blank">在线观看成人网</a>| <a href="http://saomm18.com" target="_blank">蜜臀av国产精品久久久久</a>| <a href="http://z169.com" target="_blank">午夜精品久久久久久久99水蜜桃</a>| <a href="http://3644688.com" target="_blank">欧美激情欧美狂野欧美精品</a>| <a href="http://pao449.com" target="_blank">亚洲成人在线网</a>| <a href="http://9xxpp.com" target="_blank">久久亚洲私人国产精品va</a>| <a href="http://4534com.com" target="_blank">欧美一区=区</a>| <a href="http://4430x.com" target="_blank">国产午夜精品一区二区三区欧美</a>| <a href="http://www47011.com" target="_blank">亚洲天堂av高清</a>| <a href="http://fsxinruiph.com" target="_blank">中文av字幕一区</a>| <a href="http://cca22.com" target="_blank">国产精品欧美日韩一区</a>| <a href="http://137177.com" target="_blank">午夜精品亚洲一区二区三区嫩草</a>| <a href="http://xhamster0.com" target="_blank">亚洲三级影院</a>| <a href="http://yyyy456.com" target="_blank">牛牛影视久久网</a>| <a href="http://qiezisp2.com" target="_blank">日韩亚洲国产欧美</a>| <a href="http://czhqwy.com" target="_blank">99re66热这里只有精品4</a>| <a href="http://2302345.com" target="_blank">欧美日韩国产综合视频在线观看</a>| <a href="http://4388x3.com" target="_blank">国产精品一区二区在线观看</a>| <a href="http://mimi78.com" target="_blank">欧美成人午夜免费视在线看片</a>| <a href="http://wwwq4yy.com" target="_blank">欧美日韩在线视频观看</a>| <a href="http://tp112.com" target="_blank">亚洲一区二区三区高清不卡</a>| <a href="http://cytus2wiki.com" target="_blank">av成人免费在线</a>| <a href="http://kgg93.com" target="_blank">国产精品色婷婷</a>| <a href="http://91nbs.com" target="_blank">欧美在线免费视屏</a>| <a href="http://cp3824.com" target="_blank">久久综合导航</a>| <a href="http://zhengnuoxin.com" target="_blank">亚洲精选中文字幕</a>| <a href="http://my1315.com" target="_blank">亚洲午夜伦理</a>| <a href="http://www-44899.com" target="_blank">一区在线电影</a>| <a href="http://0370city.com" target="_blank">亚洲精品亚洲人成人网</a>| <a href="http://vpay1314.com" target="_blank">国产精品三级久久久久久电影</a>| <a href="http://qiezisp2.com" target="_blank">久久精品国产免费观看</a>| <a href="http://345fz.com" target="_blank">久久免费国产精品1</a>| <a href="http://jxrisen.com" target="_blank">一本色道88久久加勒比精品 </a>| <a href="http://hy8r.com" target="_blank">久久久xxx</a>| <a href="http://bauyu121.com" target="_blank">亚洲激情一区二区三区</a>| <a href="http://xian369.com" target="_blank">亚洲片区在线</a>| <a href="http://tavbao.com" target="_blank">国产亚洲欧美一区二区三区</a>| <a href="http://xunlei520.com" target="_blank">免费观看亚洲视频大全</a>| <a href="http://012928.com" target="_blank">欧美视频日韩视频</a>| <a href="http://www-5013.com" target="_blank">久久综合九色综合久99</a>| <a href="http://www-4157.com" target="_blank">欧美久久久久久蜜桃</a>| <a href="http://yishangsh.com" target="_blank">欧美一级欧美一级在线播放</a>| <a href="http://hengbang50.com" target="_blank">久久精品最新地址</a>| <a href="http://dzyhjx.com" target="_blank">亚洲少妇在线</a>| <a href="http://ncyy4.com" target="_blank">另类综合日韩欧美亚洲</a>| <a href="http://jav1111.com" target="_blank">午夜老司机精品</a>| <a href="http://shanghaijiagu.com" target="_blank">毛片基地黄久久久久久天堂</a>| <a href="http://4388x3.com" target="_blank">午夜亚洲视频</a>| <a href="http://www668889.com" target="_blank">美女精品自拍一二三四</a>| <a href="http://339254.com" target="_blank">久久大香伊蕉在人线观看热2</a>| <a href="http://xiaoyaer.com" target="_blank">欧美高清一区</a>| <a href="http://13751144594.com" target="_blank">玖玖视频精品</a>| <a href="http://wy172.com" target="_blank">国产精品看片你懂得</a>| <a href="http://www-8438.com" target="_blank">久久久久久国产精品一区</a>| <a href="http://tareandshare.com" target="_blank">欧美精品色综合</a>| <a href="http://8181777.com" target="_blank">免费成人在线视频网站</a>| <a href="http://817794.com" target="_blank">国产精品午夜在线</a>| <a href="http://77017w.com" target="_blank">亚洲精品男同</a>| <a href="http://ffff53.com" target="_blank">亚洲国产视频直播</a>| <a href="http://283575.com" target="_blank">久久成人综合网</a>| <a href="http://5252bnet.com" target="_blank">亚洲欧美日韩一区二区</a>| <a href="http://099553.com" target="_blank">欧美精品18+</a>| <a href="http://montnove.com" target="_blank">欧美福利视频网站</a>| <a href="http://pigkrtv.com" target="_blank">激情视频亚洲</a>| <a href="http://www-787788.com" target="_blank">久久成人免费日本黄色</a>| <a href="http://xxxxxdywvip18.com" target="_blank">亚洲成人在线网</a>| <a href="http://ju255.com" target="_blank">亚洲永久免费</a>| <a href="http://ccc3636.com" target="_blank">国产精品theporn88</a>| <a href="http://www433ad.com" target="_blank">亚洲电影免费观看高清完整版在线观看</a>| <a href="http://hnautos.com" target="_blank">亚洲综合首页</a>| <a href="http://www19829.com" target="_blank">欧美日韩久久精品</a>| <a href="http://www-90443.com" target="_blank">巨乳诱惑日韩免费av</a>| <a href="http://yjdm139.com" target="_blank">国产麻豆日韩</a>| <a href="http://ssis378.com" target="_blank">亚洲永久精品国产</a>| <a href="http://vipaiqiyi.com" target="_blank">夜夜爽www精品</a>| <a href="http://yidaiban.com" target="_blank">亚洲国产成人在线</a>| <a href="http://y8e8.com" target="_blank">国产精品久久久久国产a级</a>| <a href="http://342008.com" target="_blank">免费一级欧美片在线播放</a>| <a href="http://idc0558.com" target="_blank">国产伦精品一区二区三区</a>| <a href="http://proenhub.com" target="_blank">99精品黄色片免费大全</a>| <a href="http://xuanxuan88.com" target="_blank">日韩视频免费看</a>| <a href="http://mysuteng.com" target="_blank">欧美精品一区二区三区在线看午夜</a>| <a href="http://114499com.com" target="_blank">免费久久99精品国产自</a>| <a href="http://444yd.com" target="_blank">国产亚洲综合在线</a>| <a href="http://322033.com" target="_blank">久久九九免费视频</a>| <a href="http://www-5888c.com" target="_blank">毛片一区二区</a>| <a href="http://3233328.com" target="_blank">亚洲黄一区二区</a>| <a href="http://498626.com" target="_blank">欧美精品少妇一区二区三区</a>| <a href="http://83319b.com" target="_blank">亚洲靠逼com</a>| <a href="http://wwwmm131.com" target="_blank">亚洲校园激情</a>| <a href="http://521531.com" target="_blank">国产欧美短视频</a>| <a href="http://4254888.com" target="_blank">久久久精品999</a>| <a href="http://by71222.com" target="_blank">亚洲成人在线网站</a>| <a href="http://df7166.com" target="_blank">一区二区三区导航</a>| <a href="http://my17677.com" target="_blank">国产精品丝袜91</a>| <a href="http://www25sds.com" target="_blank">久久精品色图</a>| <a href="http://cc28256.com" target="_blank">欧美激情一区二区三区</a>| <a href="http://5773000.com" target="_blank">在线视频你懂得一区</a>| <a href="http://116016.com" target="_blank">国产精品久久婷婷六月丁香</a>| <a href="http://ximaimicro.com" target="_blank">亚洲欧美综合</a>| <a href="http://xxxyyy168.com" target="_blank">欧美黑人在线观看</a>| <a href="http://124909.com" target="_blank">亚洲一区中文字幕在线观看</a>| <a href="http://527937.com" target="_blank">国产欧美一区二区三区视频</a>| <a href="http://www780yy.com" target="_blank">久久久久久亚洲精品中文字幕</a>| <a href="http://481323.com" target="_blank">亚洲第一网站</a>| <a href="http://987kt.com" target="_blank">性欧美xxxx大乳国产app</a>| <a href="http://www-ss777.com" target="_blank">狠狠入ady亚洲精品</a>| <a href="http://www333393.com" target="_blank">欧美多人爱爱视频网站</a>| <a href="http://guanghezixun.com" target="_blank">亚洲美女av黄</a>| <a href="http://zgslwtc.com" target="_blank">久久久777</a>| <a href="http://budanbao.com" target="_blank">亚洲欧洲精品一区二区三区不卡 </a>| <a href="http://smiczbb.com" target="_blank">中文在线资源观看网站视频免费不卡 </a>| <a href="http://56qn.com" target="_blank">亚洲国产精品欧美一二99</a>| <a href="http://xsjgxx.com" target="_blank">亚洲国产视频a</a>| <a href="http://278538.com" target="_blank">欧美日韩亚洲视频</a>| <a href="http://fc3332.com" target="_blank">欧美一区二区三区在线播放</a>| <a href="http://cc28256.com" target="_blank">久久久久久亚洲精品中文字幕</a>| <a href="http://414670.com" target="_blank">在线观看亚洲一区</a>| <a href="http://www18998.com" target="_blank">欧美日韩国产综合一区二区</a>| <a href="http://13501680.com" target="_blank">亚洲美女性视频</a>| <a href="http://8xxjj.com" target="_blank">欧美在线播放</a>| <a href="http://337791.com" target="_blank">91久久中文字幕</a>| <a href="http://ylsnuha.com" target="_blank">欧美日韩激情网</a>| <a href="http://56lw.com" target="_blank">老色鬼久久亚洲一区二区</a>| <a href="http://fangxinedu.com" target="_blank">99re热这里只有精品视频</a>| <a href="http://x946.com" target="_blank">午夜综合激情</a>| <a href="http://r6r4.com" target="_blank">亚洲欧洲精品一区二区精品久久久</a>| <a href="http://520taose.com" target="_blank">亚洲深夜福利</a>| <a href="http://2015xiaomingkankan.com" target="_blank">亚洲伦理中文字幕</a>| <a href="http://72966t.com" target="_blank">欧美午夜精品久久久久久孕妇 </a>| <a href="http://www-55125.com" target="_blank">欧美插天视频在线播放</a>| <a href="http://zjjieda.com" target="_blank">亚洲一区影音先锋</a>| <a href="http://czhqwy.com" target="_blank">亚洲动漫精品</a>| <a href="http://599107.com" target="_blank">国产亚洲欧美一区二区三区</a>| <a href="http://wwwhaodd116.com" target="_blank">欧美三级网址</a>| <a href="http://jilcool.com" target="_blank">免费成人av在线</a>| <a href="http://wltaste.com" target="_blank">久久精品国产v日韩v亚洲</a>| <a href="http://www13256.com" target="_blank">99视频日韩</a>| <a href="http://9113i.com" target="_blank">亚洲欧洲在线一区</a>| <a href="http://854277.com" target="_blank">嫩模写真一区二区三区三州</a>| <a href="http://5917t.com" target="_blank">久久精品国产99国产精品</a>| <a href="http://esdzu.com" target="_blank">欧美在线视频a</a>| <a href="http://www492002.com" target="_blank">一区二区三区久久</a>| <a href="http://xindefalv.com" target="_blank">91久久黄色</a>| <a href="http://mm77gg.com" target="_blank">欧美国产日韩视频</a>| <a href="http://xianconnector.com" target="_blank">久久手机免费观看</a>| <a href="http://apap77.com" target="_blank">久久久久久网址</a>| <a href="http://345kt.com" target="_blank">久久国产视频网站</a>| <a href="http://118017.com" target="_blank">久久久午夜电影</a>| <script> (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })(); </script> </body>