jpegtran optimize without changing filename

后端 未结 6 1985
囚心锁ツ
囚心锁ツ 2021-02-05 06:42

I need to optimize some images, but not change their name.

jpegtran -copy none -optimize image.jpg > image.jpg 

However, this seems to crea

6条回答
  •  一整个雨季
    2021-02-05 07:24

    jpegtran -copy none -progressive -optimize -outfile filename filename
    

    For comprehensive optimization: -copy none tells jpegtran to suppress all comments and other excess baggage present in the source jpeg, progressive generates a progressive jpeg, -optimize performs the actual optimizations, and -outfile sets the output file name. The last parameter is the input file name: if they are the same, your file is optimized in place.

    Edit: you might want to also try mozjpeg, according to this article on lossless jpeg compression tools http://blarg.co.uk/blog/comparison-of-jpeg-lossless-compression-tools

提交回复
热议问题