https://github.com/cute/pyjpegoptim
PyJpegOptim is a utility for optimizing JPEG files.
https://github.com/cute/pyjpegoptim
Last synced: 5 months ago
JSON representation
PyJpegOptim is a utility for optimizing JPEG files.
- Host: GitHub
- URL: https://github.com/cute/pyjpegoptim
- Owner: cute
- License: gpl-2.0
- Created: 2013-06-26T02:03:36.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2013-06-26T02:16:29.000Z (about 13 years ago)
- Last Synced: 2025-12-17T02:49:13.591Z (8 months ago)
- Language: C
- Size: 109 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
### 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()