项目中需要显示图片的Exif信息,在CodeProject上找到实现方法
以下是Console输出的效果


System.Drawing.Bitmap bmp = 
new System.Drawing.Bitmap("F:\\DSCI0006.JPG");

// create a new instance of Extractor
// class. Here "\n" is the newline
// that is used to seprate output of two tags.
// You can replace it with "," if you want
Goheer.EXIF.EXIFextractor er =
new Goheer.EXIF.EXIFextractor(ref bmp,"\n");

// now dump all the tags on console
Console.Write(er);

// to set a tag you have to specify the tag id
// code 0x13B is for artist name
// since this number has ascii string with
// it pass the string you want to set
er.setTag(0x13B,"http://www.goheer.com");

// dispose the image here or do whatever you want.
//

CodeProject上的地址
http://www.codeproject.com/csharp/exifextractor.asp

相关文章

Write a comment:



(将显示你的Gravatar图标)  



[b][/b] - [i][/i] - [u][/u]- [quote][/quote]

:-/ ^_^ :d :o :kiss: :) :p :se: [yeah] :( :love: :han: :up: :cry: :zzz: o_o

评论提交有问题?