如何在不重新压缩 JPEG 的情况下删除 EXIF 数据? [英] How to remove EXIF data without recompressing the JPEG?

查看:29
本文介绍了如何在不重新压缩 JPEG 的情况下删除 EXIF 数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想从 JPEG 文件中删除 EXIF 信息(包括缩略图、元数据、相机信息……一切!),但我不想重新压缩它,因为重新压缩 JPEG 会降低质量,以及通常会增加文件大小.

I want to remove the EXIF information (including thumbnail, metadata, camera info... everything!) from JPEG files, but I don't want to recompress it, as recompressing the JPEG will degrade the quality, as well as usually increasing the file size.

我正在寻找 Unix/Linux 解决方案,如果使用命令行会更好.如果可能,请使用 ImageMagick(转换工具).如果这不可能,一个小的 Python、Perl、PHP(或 Linux 上的其他常用语言)脚本就可以了.

I'm looking for a Unix/Linux solution, even better if using the command-line. If possible, using ImageMagick (convert tool). If that's not possible, a small Python, Perl, PHP (or other common language on Linux) script would be ok.

有一个类似的问题,但是与.NET 相关.

There is a similar question, but related to .NET.

推荐答案

exiftool 为我完成这项工作,它是用 perl 编写的,因此应该适用于任何 o/s

exiftool does the job for me, it's written in perl so should work for you on any o/s

https://exiftool.org/

用法:

exiftool -all= image.jpg

更新 - 正如 PeterCo 在下面解释的那样,这将删除所有标签.如果您只想删除 EXIF 标签,那么您应该使用

UPDATED - as PeterCo explains below this will remove ALL of the tags. if you just want to remove the EXIF tags then you should use

exiftool -EXIF= image.jpg

这篇关于如何在不重新压缩 JPEG 的情况下删除 EXIF 数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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