简单的方法来从JPEG与.NET删除EXIF数据方法来、简单、数据、JPEG

2023-09-04 02:12:06 作者:手心的温度

如何从一个JPEG删除所有的EXIF数据,我发现很多的例子如何阅读和编辑各种libaries的EXIF数据,但所有我会需要的是一个简单的例子,如何将其删除。

how can i remove all EXIF data from a JPEG, i found lots of examples how to read and edit the EXIF data with various libaries but all i would need is a simple example how to remove it.

只是为了测试提出所以即使是最丑陋的和hackished的做法将是有益的:)

it just for testing propose so even the ugliest and hackished approach would be helpful :)

我已经尝试过搜索的EXIF开始/结束标记0xFFE1和放大器; 0xFFE2,最后一个没有在我的情况存在0_o

i already tried searching for the EXIF start/end markers 0xFFE1 & 0xFFE2, the last one does not exist in my case 0_o

TIA

推荐答案

我想读取文件到一个位图对象,并写出到文件一次应该做的伎俩。

I think reading in the file into a Bitmap object and writing out to a file again should do the trick.

我记得感到沮丧,在做我的图像旋转程序,它删除了EXIF数据。但在这种情况下,这正是你想要的!

I remember feeling frustrated while doing my "image rotation program" that it removed the EXIF data. But in this case, it's exactly what you want!