在 C# 中为图像添加 EXIF 信息
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/11011915/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Adding EXIF Info to Images in C#
提问by techno
I want to add basic exif info to images like author,camera model,date etc.Is there a way to do this using the Inbuilt classes without using other external libraries.Does the image formats like JPEG,PNG,TIFF,BMP,GIF Support all EXIF Fields.
我想向作者、相机模型、日期等图像添加基本的 exif 信息。所有 EXIF 字段。
采纳答案by Paul B.
System.Drawingallows modifying the image properties with PropertyItems/SetPropertyItem. A sample can be found here.
System.Drawing允许使用PropertyItems/修改图像属性SetPropertyItem。可以在此处找到示例。
But this access is quite basic and there are quite a few libraries around (see for instance How to edit EXIF data in .NET). So I wonder if it's worth the trouble.
但是这种访问是非常基本的,并且周围有很多库(参见例如如何在 .NET 中编辑 EXIF 数据)。所以我想知道这样做是否值得。
After all, only JPEG and TIFF files support EXIF metadata according to Wikipedia.
毕竟,根据维基百科,只有 JPEG 和 TIFF 文件支持 EXIF 元数据。

