Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

a utility for optimizing JPEG files

Project description

What is PyJpegOptim?

PyJpegOptim is a utility for optimizing JPEG files. It provides lossless optimization (based on optimizing the Huffman tables) and “lossy” optimization based on setting a maximum quality factor.

Installation

You need to install libjpeg first, To install JpegOptim:

Debian:

apt-get install libjpeg-dev -y

FreeBSD:

cd /usr/ports/graphics/jpeg
make install clean

To install PyJpegOptim:

pip install pyjpegoptim

How to use it?

Following is a simple example:

# -*- coding: utf8 -*-
from pyjpegoptim import JpegOptim
t = JpegOptim('/tmp/test.jpg', quality=80)
t.save('/tmp/test_optim.jpg')
t.close()

Project details


Release history Release notifications

Download files

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

Files for pyjpegoptim, version 0.1.1
Filename, size File type Python version Upload date Hashes
Filename, size pyjpegoptim-0.1.1.zip (4.4 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page