We don’t allow questions seeking recommendations for software libraries, tutorials, tools, books, or other off-site resources. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(4)
如果您计划编写自己的库来编辑标签,则以下是 Exif 交换格式的规范。
http://www.exif.org/specifications.html
这是一个用 Perl 编写的库,满足您可以从中了解您的需求:
http://www.sno。 phy.queensu.ca/~phil/exiftool/
这是一个不错的 .NET 库,用于 Exif 评估,来自 代码项目:
http://www.codeproject.com/KB/graphics /exiftagcol.aspx
Here are the specifications for the Exif interchange format, if you plan to code your own library for editing tags.
http://www.exif.org/specifications.html
Here's a library written in Perl that meets your needs that you may be able to learn from:
http://www.sno.phy.queensu.ca/~phil/exiftool/
Here's a decent .NET library for Exif evaluation from The Code Project:
http://www.codeproject.com/KB/graphics/exiftagcol.aspx
您可以在没有任何外部库的情况下执行此操作:
您可以找到的所有可能的 PropertyItem id(包括 exif)的列表 此处。
更新:同意,此方法将在保存时重新编码图像。 但我想起了另一种方法,在WinXP SP2及更高版本中添加了新的成像组件-WIC,你可以使用它们无损写入元数据-操作方法:使用元数据重新编码 JPEG 图像。
You can do this without any external lib:
List of all possible PropertyItem ids (including exif) you can found here.
Update: Agreed, this method will re-encode image on save. But I have remembered another method, in WinXP SP2 and later there is new imaging components added - WIC, and you can use them to lossless write metadate - How-to: Re-encode a JPEG Image with Metadata.
exiv2net 库(exiv2 之上的 .NET 包装器)可能就是您想要的为了。
exiv2net library (a .NET wrapper on top of exiv2) may be what you're looking for.
我写了一个小测试,我多次压缩一个文件来查看质量下降情况,你可以在第三次第四次压缩中看到它,这是非常糟糕的。
但幸运的是,如果您始终对 JpegBitmapEncoder 使用相同的 QualityLevel,则不会出现降级。
在此示例中,我在元数据中重写了 100 倍的关键字,但质量似乎没有改变。
I wrote a small test where I compress one file many times to see the quality degradation and you can see it in the third-fourth compression, which is very bad.
But luckily, if you always use same QualityLevel with JpegBitmapEncoder there is no degradation.
In this example I rewrite keywords 100x in metadata and the quality seems not to change.