Optimize or convert images to achieve maximum compression
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Дрябжинский Сергей cb489fb524 Версия 1.0.38 - исправил падение-выход, если не находило cwebp/heif-enc/avifenc 2 months ago
.gitignore Update ignore, copy file stats for webp 6 years ago
README.md Версия 1.0.37, обновление описания 4 months ago
pyimizer.py Версия 1.0.38 - исправил падение-выход, если не находило cwebp/heif-enc/avifenc 2 months ago

README.md

Image optimizer written on Python

It uses programs and image type conversion to achieve maximum compression.

Optimizers

  • jpegoptim
  • optipng
  • pngquant
  • gifsicle
  • leanify

Converters

  • imagemagick (identify, convert)
  • cwebp, gif2webp
  • ffmpeg
  • heif-enc
  • avifenc (libaom >= 3)

Works via

Python 2.7 or 3.2+

Process

  • Try to convert to progressive format:
    • jpeg -> webp/heic/avif (lossy) with same quality
    • jpeg -> png -> webp/heic/avif (lossless)
    • png -> webp/heif/avif (lossless)
    • gif/tiff/bmp -> png -> webp/heic/avif (lossless, 1 frame)
    • gif -> webp (lossless, multi-frame)
    • gif -> webm (almost lossless vp9, multi-frame)
    • webp -> heif/avif (lossy 100% quality)
  • Optimize result image:
    • jpeg -> leanify / jpegoptim
    • png -> pngquant / optipng
    • gif -> gifsicle

Note: pngquant used only if image has less than 16384 colours.