Skip to main content

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


Download files

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

Source Distribution

pyjpegoptim-0.1.1.zip (4.4 kB view details)

Uploaded Source

File details

Details for the file pyjpegoptim-0.1.1.zip.

File metadata

  • Download URL: pyjpegoptim-0.1.1.zip
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pyjpegoptim-0.1.1.zip
Algorithm Hash digest
SHA256 f582bdff1261ea3b8755113bba70e730b29624381e8880db98b585bc717035f0
MD5 a3758b902f94a45bacc89b8dd78e2ad2
BLAKE2b-256 c7f206a781605856153a5643e646ff50365c7aec6f2a611ebe10e3d0d08ec6e3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page