日韩无码专区无码一级三级片|91人人爱网站中日韩无码电影|厨房大战丰满熟妇|AV高清无码在线免费观看|另类AV日韩少妇熟女|中文日本大黄一级黄色片|色情在线视频免费|亚洲成人特黄a片|黄片wwwav色图欧美|欧亚乱色一区二区三区

RELATEED CONSULTING
相關(guān)咨詢
選擇下列產(chǎn)品馬上在線溝通
服務(wù)時間:8:30-17:00
你可能遇到了下面的問題
關(guān)閉右側(cè)工具欄

新聞中心

這里有您想知道的互聯(lián)網(wǎng)營銷解決方案
使用C#旋轉(zhuǎn)圖片:EXIF

 一、什么是EXIF

成都創(chuàng)新互聯(lián)公司于2013年成立,先為米脂等服務(wù)建站,米脂等地企業(yè),進(jìn)行企業(yè)商務(wù)咨詢服務(wù)。為米脂企業(yè)網(wǎng)站制作PC+手機(jī)+微官網(wǎng)三網(wǎng)同步一站式服務(wù)解決您的所有建站問題。

Exif是英文Exchangeable Image File(可交換圖像文件)的縮寫,最初由日本電子工業(yè)發(fā)展協(xié)會(JEIDA --Japan Electronic Industry Development Association) 制訂,目前的最新版本是發(fā)表于2002年04月的2.21 版。國際標(biāo)準(zhǔn)化組織(ISO)正在制訂的相機(jī)文件設(shè)計標(biāo)準(zhǔn)(DCF -- Design role for Camera File system)可能以Exif2.1為基礎(chǔ)。

所有的JPEG文件以字符串“0xFFD8”開頭,并以字符串“0xFFD9”結(jié)束。文件頭中有一系列“0xFF??”格式的字符串,稱為“標(biāo)識”,用來標(biāo)記JPEG文件的信息段。“0xFFD8”表示圖像信息開始,“0xFFD9”表示圖像信息結(jié)束,這兩個標(biāo)識后面沒有信息,而其它標(biāo)識緊跟一些信息字符。

0xFFE0 -- 0xFFEF之間的標(biāo)識符稱為“應(yīng)用標(biāo)記”,沒有被常規(guī)JPEG文件利用,Exif正是利用這些信息串記錄拍攝信息如快門速度、光圈值等,甚至可以包括全球定位信息。其中拍攝方向的ID為“0x0112”,有1至8共8種值。而C#旋轉(zhuǎn)圖片可以通過EXIF來實現(xiàn)。

二、EXIF Orientation

 
 
 
 
  1. Orientation   
  2. The image orientation viewed in terms of rows and columns.   
  3. Tag = 274 (112.H)   
  4. Type = SHORT   
  5. Count = 1   
  6. Default = 1   
  7. 1 = The 0th row is at the visual top of the image, and the 0th column is the visual left-hand side.   
  8. 2 = The 0th row is at the visual top of the image, and the 0th column is the visual right-hand side.   
  9. 3 = The 0th row is at the visual bottom of the image, and the 0th column is the visual right-hand side.   
  10. 4 = The 0th row is at the visual bottom of the image, and the 0th column is the visual left-hand side.   
  11. 5 = The 0th row is the visual left-hand side of the image, and the 0th column is the visual top.   
  12. 6 = The 0th row is the visual right-hand side of the image, and the 0th column is the visual top.   
  13. 7 = The 0th row is the visual right-hand side of the image, and the 0th column is the visual bottom.   
  14. 8 = The 0th row is the visual left-hand side of the image, and the 0th column is the visual bottom.   
  15. Other = reserved 

三、使用C#旋轉(zhuǎn)圖片

 
 
 
 
  1. public static void rotating(Bitmap img,ref int width, ref int height, int orien)  
  2. {  
  3.     int ow = width;  
  4.     switch (orien)  
  5.     {  
  6.         case 2:  
  7.             img.RotateFlip(RotateFlipType.RotateNoneFlipX);//horizontal flip  
  8.             break;  
  9.         case 3:  
  10.             img.RotateFlip(RotateFlipType.Rotate180FlipNone);//right-top  
  11.             break;  
  12.         case 4:  
  13.             img.RotateFlip(RotateFlipType.RotateNoneFlipY);//vertical flip  
  14.             break;  
  15.         case 5:  
  16.             img.RotateFlip(RotateFlipType.Rotate90FlipX);  
  17.             break;  
  18.         case 6:  
  19.             img.RotateFlip(RotateFlipType.Rotate90FlipNone);//right-top  
  20.             width = height;  
  21.             height = ow;  
  22.             break;  
  23.         case 7:  
  24.             img.RotateFlip(RotateFlipType.Rotate270FlipX);  
  25.             break;  
  26.         case 8:  
  27.             img.RotateFlip(RotateFlipType.Rotate270FlipNone);//left-bottom  
  28.             width = height;  
  29.             height = ow;  
  30.             break;  
  31.         default:  
  32.             break;  
  33.     }  

至此,使用C#旋轉(zhuǎn)圖片的目的就達(dá)到了。


網(wǎng)站題目:使用C#旋轉(zhuǎn)圖片:EXIF
標(biāo)題來源:http://m.5511xx.com/article/cogosjo.html