在Windows Phone 7中获取EXIF标记

我想获得我在Windows Phone 7中拍摄的图像的所有EXIF标签。我尝试过使用ExifLib,但似乎无法正确使用它。

在我的CaptureImageAvailable事件处理程序中,我有以下代码:

 JpegInfo info = ExifReader.ReadJpeg(e.ImageStream, "Pic.jpeg"); Dispatcher.BeginInvoke(delegate() { textBox1.Text = info.ExposureTime.ToString(); textBox2.Text = info.FNumber.ToString(); }); e.ImageStream.Close(); 

textBox1textBox2都显示为0。

我的“Cam.Capture事件”每200毫秒触发一次。 这对这些值有影响吗?

任何帮助将不胜感激! 🙂

我认为你的代码一切正常,价值没有设定。

这certificate这不是你的错:

  • 看看这篇博文 ,主要是阅读EXIF数据的教程。 在那里你可以找到数据的屏幕截图:设置了很多值,但你需要的值也是0.但我不确定这张照片是否真的是用手机拍照的。

  • 所以我测试了自己,价值观如下; 你需要的字段也是0:

     Artist "" Copyright null DateTime "2011:11:01 20:50:07" Description null ExposureTime 0.0 FileName "\\Applications\\Data\\[GUID]\\Data\\PlatformData\\CameraCapture-[GUID].jpg.jpg" FileSize 789355 Flash No FNumber 0.0 GpsLatitude {double[3]} GpsLatitudeRef Unknown GpsLongitude {double[3]} GpsLongitudeRef Unknown Height 1944 IsColor true IsValid true LoadTime {00:00:00.1340000} Make "HTC" Model "7 Trophy" Orientation TopRight ResolutionUnit Inch Software "Windows Phone 7.5" ThumbnailData {byte[14913]} ThumbnailOffset 518 ThumbnailSize 14913 UserComment null Width 2592 XResolution 72.0 YResolution 72.0 

看起来每200ms用EXIF做一些事情不是原因。 出于好奇,我在将图片与PC同步后再次查看EXIF数据。 价值观不存在。 抱歉。