jpegtran optimize without changing filename

后端 未结 6 2040
囚心锁ツ
囚心锁ツ 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:40

    Another option if -outfile is not supported:

    jpegtran -copy none -optimize image.jpg | sponge image.jpg
    

    sponge is part of moreutils.

提交回复
热议问题