meowtec / Imagine

🖼️ PNG/JPEG optimization app for macOS, Windows and Linux.
MIT License
3.69k stars 278 forks source link

能否命令行调用软件压缩图片? #77

Closed Severn17 closed 3 years ago

Severn17 commented 3 years ago

Can the command line call can the command line call the software compressed image?If not, can you support it? 能否命令行调用软件压缩图片?如果没有的话能否支持?

If you offend, please forgive me, I'm glad to use it 如有冒犯,请原谅,很高兴可以用到

Version

eg: 0.5.0

Operating system (version and arch)

eg: Windows 10 x64

0x2CA commented 3 years ago

https://github.com/kornelski/pngquant

meowtec commented 3 years ago

If you need to launch the app using command line, just find the binary file then execute it.

# MacOS
/Applications/Imagine.app/Contents/MacOS/Imagine

With some initial files:

/Applications/Imagine.app/Contents/MacOS/Imagine /path/to/image.png

To compress and save in one command, you should use pngquant or mozjpeg.

你找到对应的二进制文件,就能通过命令行启动。也可以带上默认的图片。如果希望一键压缩保存,应该使用 pngquant / mozjpeg.