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.
Дрябжинский Сергей f640149632 One more time 9 months ago
.gitignore Update ignore, copy file stats for webp 5 years ago
README.md One more time 9 months ago
pyimizer.py Version 1.0.34 9 months ago

README.md

Image optimizer written on Python

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

Optimizers

  • leanify
  • jpegoptim
  • optipng
  • pngquant
  • gifsicle

Converters

  • imagemagick (identify, convert)
  • cwebp, gif2webp
  • ffmpeg
  • heif-enc

Process

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

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