添加EXIF信息,以图片在C#图片、信息、EXIF

2023-09-04 09:58:24 作者:你在我安

我想补充的基本EXIF信息像作者,相机型号,图片日期etc.Is有没有办法使用内置的类来做到这一点,而无需使用其他外部libraries.Does的图像格式,如JPEG,PNG,TIFF,BMP ,GIF支持所有的EXIF领域。

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.

推荐答案

System.Drawing中允许与修改图片属性 PropertyItems / SetPropertyItem 。样本可以发现here.

System.Drawing allows modifying the image properties with PropertyItems/SetPropertyItem. A sample can be found here.

但是这种访问是很基本的和有大约相当多的库(参见例如如何编辑在.NET EXIF​​数据)。所以我想如果这是值得的麻烦。

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.

毕竟,只有JPEG和TIFF文件支持EXIF元数据,根据维基百科。

After all, only JPEG and TIFF files support EXIF metadata according to Wikipedia.