How to remove EXIF data without recompressing the 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.

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.

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


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

http://www.sno.phy.queensu.ca/~phil/exiftool

usage :

exiftool -all= image.jpg

随着imagemagick:

convert <input file> -strip <output file>

ImageMagick has the -strip parameter, but it recompresses the image before saving. Thus, this parameter is useless for my need.

This topic from ImageMagick forum explains that there is no support for JPEG lossless operations in ImageMagick (whenever this changes, please post a comment with a link!), and suggests using jpegtran (from libjpeg):

jpegtran -copy none image.jpg > newimage.jpg
jpegtran -copy none -outfile newimage.jpg image.jpg

(If you are unsure about me answering my own question, read this and this and this)

链接地址: http://www.djcxy.com/p/59916.html

上一篇: 相当于MailChimp或ConstantContact等邮件列表管理器的源代码。?

下一篇: 如何删除EXIF数据而无需重新压缩JPEG?