在 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();
textBox1
和 textBox2
都显示 0。
我的“Cam.Capture 事件”被触发每 200 毫秒一次。这对这些值有影响吗?
任何帮助将不胜感激! :)
I would like to get all the EXIF tags of an image I took in Windows Phone 7. I have tried using ExifLib, but can't seem to get it right.
In my event handler for CaptureImageAvailable
I have the following code:
JpegInfo info = ExifReader.ReadJpeg(e.ImageStream, "Pic.jpeg");
Dispatcher.BeginInvoke(delegate()
{
textBox1.Text = info.ExposureTime.ToString();
textBox2.Text = info.FNumber.ToString();
});
e.ImageStream.Close();
Both textBox1
and textBox2
are displaying 0.
My "Cam.Capture event" is fired every 200 milliseconds. Does this have any effect on these values?
Any help would be greatly appreciated! :)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为您的代码一切正常,只是未设置值。
这里有证据表明这不是你的错:
看看这篇博文 基本上是一个关于读取 EXIF 数据的教程。在那里你可以找到数据的截图:设置了很多值,但你需要的也是0。但我不确定这张照片是否真的是用手机摄像头拍摄的。
所以我自己测试了一下,数值如下;您需要的字段也是 0:
看起来每 200 毫秒对 EXIF 执行一些操作并不是原因。出于好奇,我在将图片与电脑同步后再次查看了 EXIF 数据。这些价值观根本不存在。对不起。
I think everything is ok with your code, the values just aren't set.
Here is evidence that it's not your fault:
Have a look at this blog post which basically is a tutorial on reading EXIF data. There you find a screenshot of the data: many values are set but the ones you need are also 0. But I am not sure if this photo really was taken with the phone camera.
So I tested myself and the values are as follows; the fields you need are 0 as well:
Looks like doing something with the EXIF every 200ms is not the cause. Out of curiosity I had a second look at the EXIF data after synching the pictures with the PC. The values are just not there. Sorry.