Skip to content

Instantly share code, notes, and snippets.

@thevar1able
Created January 29, 2016 11:54
Show Gist options
  • Select an option

  • Save thevar1able/d2e55bfeef2cc25ae966 to your computer and use it in GitHub Desktop.

Select an option

Save thevar1able/d2e55bfeef2cc25ae966 to your computer and use it in GitHub Desktop.
Выкачиваем pngquant, jpeg-archive и ставим ladon
git clone git://github.com/pornel/pngquant.git
git clone git://github.com/danielgtaylor/jpeg-archive
npm install -g ladon
Ставим зависимости для сборки (возможно есть ещё)
apt-get install nasm mozjpeg
Собираем и ставим в систему(выполнять в папках jpeg-archive и pngquant)
./configure && make && sudo checkinstall
Сжатие
Последовательно выполнить в папке с картинками
Для PNG
ladon "./**/*.png" -- pngquant --speed 2 --force --skip-if-larger FULLPATH FULLPATH
Для JPEG
ladon "./**/*.jpg" -- /home/thevar1able/trash/jpeg-archive/jpeg-recompress --method smallfry FULLPATH FULLPATH
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment