修改图片的md5

之前批量改变过图片的md5,感觉用工具挺简单的,但是这次安装imagemagick遇到了小小的坑。
终端 brew install imagemagick 安装后发现报错,

Error: No such file or directory @ rb_sysopen /Users/zhaop/Library/Caches/Homebrew/downloads/b029888e328a4327bb059376b4838e6180fa6411c6cf160dba8dcec0d73bfd52--little-cms2--2.12.big_sur.bottle.tar.gz

这说明little-cms2没安装成功,
终端执行 brew install imagemagick 进行安装即可。

最后不报错的话,执行 brew info imagemagick

==> Dependencies
Build: pkg-config ✘
Required: freetype ✔, ghostscript ✔, jpeg ✔, libheif ✔, liblqr ✔, libomp ✔, libpng ✔, libtiff ✔, libtool ✔, little-cms2 ✔, openexr ✔, openjpeg ✔, webp ✔, xz ✔
==> Options
--HEAD
    Install HEAD version
==> Analytics
install: 145,887 (30 days), 480,926 (90 days), 1,924,650 (365 days)
install-on-request: 130,291 (30 days), 426,600 (90 days), 1,668,513 (365 days)
build-error: 6 (30 days)

然后cd [dr](改的文件夹 )
终端执行 find . -iname "*.png" -exec echo {} \; -exec magick {} {} \;即可

如有问题,或者错误,请留言,谢谢!!!

你可能感兴趣的:(修改图片的md5)