I am looking for a way to compress jpeg images on a Mac from Terminal. Basically, a library like pngquant, except it is for jpeg format.
Are you aware of a software that does that?
I am looking for a way to compress jpeg images on a Mac from Terminal. Basically, a library like pngquant, except it is for jpeg format.
Are you aware of a software that does that?
You can use GraphicsMagick which is a newer and more efficient image processing system than ImageMagick. Both apps are available via direct download, MacPorts, and Homebrew.
I suggest using GraphicsMagick as it is smaller and faster than ImageMagic. The commands are generally the same with the only difference being that you prepend a gm
with the GraphicsMagick tool. gm
is the binary with the commands convert
, identify
, mogrify
, etc. are arguments where as IM, the same arguments are individual binaries.
The commands are as follows:
GraphicsMagick:
gm convert -quality X% source.jpg result.jpg
ImageMagick:
convert -quality X% source.jpg result.jpg
X
is a positive integer value (i.e. 85 for 85%); source and result are the original filename and the output filename.