mac进行图片压缩

2024-08-23 19:56:56 浏览数 (4)

就经验性来说,人强烈追求什么的时候,那东西基本上是不来的,而当你极力回避它的时候,它却自然找上头来。——《海边的卡夫卡》

分享一个在mac上递归压缩某目录pngjpg图片的脚本

代码语言:javascript复制
Github-Id-VampireAchao:Downloads achao$ brew install pngquant
HOMEBREW_BREW_GIT_REMOTE set: using https://mirrors.ustc.edu.cn/brew.git as the Homebrew/brew Git remote.
remote: Enumerating objects: 174, done.
remote: Counting objects: 100% (26/26), done.
remote: Total 174 (delta 26), reused 26 (delta 26), pack-reused 148
Receiving objects: 100% (174/174), 96.85 KiB | 1.56 MiB/s, done.
Resolving deltas: 100% (85/85), completed with 6 local objects.
From https://mirrors.ustc.edu.cn/brew
   21e3055eb5..f17ee4303c  master     -> origin/master
 * [new tag]               4.3.16     -> 4.3.16
==> Auto-updating Homebrew...
Adjust how often this is run with HOMEBREW_AUTO_UPDATE_SECS or disable with
HOMEBREW_NO_AUTO_UPDATE. Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
==> Auto-updated Homebrew!
Updated 2 taps (homebrew/core and homebrew/cask).
==> New Formulae
asm6809      boost@1.85   go@1.22      gql          tmpmail      ufbt
==> New Casks
geekbench-ai                             nrf-connect

You have 28 outdated formulae and 2 outdated casks installed.
Github-Id-VampireAchao:blog-img achao$ brew install jpegoptim
==> Fetching jpegoptim
==> Downloading https://mirrors.ustc.edu.cn/homebrew-bottles/bottles/jpegoptim-1
######################################################################### 100.0%
==> Pouring jpegoptim-1.5.5.arm64_sonoma.bottle.tar.gz



	

0 人点赞