Welcome to pyguetzli’s documentation!
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.
Example Usage
import pyguetzli
input_jpeg = open("./test/image.jpg", "rb").read()
optimized_jpeg = pyguetzli.process_jpeg_bytes(input_jpeg)
output = open("./optimized.jpg", "wb")
output.write(optimized_jpeg)