Skip to main content

Python bindings for Google's Guetzli, a JPEG encoder that optimises JPEG compression

Project description

Github Discord PYPI Version Build Status License

PyGuetzli is a Python binding for Google’s Guetzli library.

Description of Guetzli from official’s repo:

Guetzli is a JPEG encoder that aims for excellent compression density at high visual quality. Guetzli-generated images are typically 20-30% smaller than images of equivalent quality generated by libjpeg. Guetzli generates only sequential (nonprogressive) JPEGs due to faster decompression speeds they offer.

Usage Example

import pyguetzli

input_jpeg = open("./test/image.jpg", "rb").read()
optimized_jpeg = pyguetzli.process_jpeg_bytes(input_jpeg)

output = open("./optimized.jpg", "wb")


  • 1.0.11:
    • arm64 and universal2 wheels for macOS
    • x86 and x68_64 wheels for musl-based Linux distro (Alpine,…)
    • win32 wheels for Windows (x86_64 were already available)
  • 1.0.10: Python 3.10 support and wheels
  • 1.0.9: Provides prebuilt wheel packages
  • 1.0.8: Updates Guetzli and python dependencies
  • 1.0.7: Fixes unicode issue when installing pyguetzli (#4)
  • 1.0.6: Fixes a typo in compilator options on unix
  • 1.0.5: Adds optimization flags when compiling Guetzli
  • 1.0.4: MS Windows support
  • 1.0.3: Updates Guetzli library
  • 1.0.2: PIL Images: fixes crash with non RGB/RGBA images (grayscale, indexed,…)
  • 1.0.1: Adds --std=c++11 flag when building Guetzli
  • 1.0.0:
    • New and simpler API
    • Built-in function to deal with PIL / Pillow Images
    • Documentation (Sphinx)
    • Guetzli update
  • 0.9.0: Initial release

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyguetzli-1.0.11.tar.gz (111.7 kB view hashes)

Uploaded source

Built Distributions

pyguetzli-1.0.11-cp310-cp310-win_amd64.whl (127.0 kB view hashes)

Uploaded cp310

pyguetzli-1.0.11-cp310-cp310-win32.whl (105.8 kB view hashes)

Uploaded cp310

pyguetzli-1.0.11-cp39-cp39-win_amd64.whl (127.0 kB view hashes)

Uploaded cp39

pyguetzli-1.0.11-cp39-cp39-win32.whl (105.8 kB view hashes)

Uploaded cp39

pyguetzli-1.0.11-cp38-cp38-win_amd64.whl (127.0 kB view hashes)

Uploaded cp38

pyguetzli-1.0.11-cp38-cp38-win32.whl (105.8 kB view hashes)

Uploaded cp38

pyguetzli-1.0.11-cp37-cp37m-win_amd64.whl (127.0 kB view hashes)

Uploaded cp37

pyguetzli-1.0.11-cp37-cp37m-win32.whl (105.8 kB view hashes)

Uploaded cp37

pyguetzli-1.0.11-cp36-cp36m-win_amd64.whl (127.6 kB view hashes)

Uploaded cp36

pyguetzli-1.0.11-cp36-cp36m-win32.whl (105.9 kB view hashes)

Uploaded cp36

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page