在 C# 中为图像添加 EXIF 信息 [英] Adding EXIF Info to Images in C#

查看:40
本文介绍了在 C# 中为图像添加 EXIF 信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想向作者、相机模型、日期等图像添加基本的 exif 信息.有没有办法使用内置类而不使用其他外部库来做到这一点.图像格式是否像 JPEG、PNG、TIFF、BMP,GIF 支持所有 EXIF 字段.

解决方案

System.Drawing 允许使用 PropertyItems/SetPropertyItem 修改图像属性.可以在此处找到示例一>.

但是这种访问是非常基本的,并且周围有很多库(参见例如 如何在 .NET 中编辑 EXIF 数据).所以我想知道这样做是否值得.

毕竟,根据 维基百科,只有 JPEG 和 TIFF 文件支持 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 allows modifying the image properties with PropertyItems/SetPropertyItem. A sample can be found here.

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.

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

这篇关于在 C# 中为图像添加 EXIF 信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆