Skip to main content

A Python wrapper for jpegtran.

Project description

JPEG: A Python wrapper for jpegtran

JPEG is a Python wrapper for jpegtran, designed to make it easier to interact with and manipulate JPEG files directly from Python. It is much faster than Pillow and OpenCV, as it operates directly on the JPEG file headers. This also means, as you might expect, only the JPEG format is supported.

Dependancies

You must have jpegtran installed on your system to use this library.

Installation

To install the JPEG Python wrapper, you can use pip:

pip install jpegtran

Usage

Here's how to use the JPEG wrapper to open a JPEG file, optimize it, rotate it by 90 degrees, and save the result:

import jpeg

jpeg \
    .open('example.jpg') \
    .optimize() \
    .rotate(90) \
    .save('example-rotated.jpg')

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

jpegtran-0.0.3.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

jpegtran-0.0.3-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file jpegtran-0.0.3.tar.gz.

File metadata

  • Download URL: jpegtran-0.0.3.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.8.10

File hashes

Hashes for jpegtran-0.0.3.tar.gz
Algorithm Hash digest
SHA256 a5189c4355d3be9f52b5a6c211adaeb88485b2c306fc080436d53aa1e7ad89f0
MD5 c84e253d3268cbbdb1a9c23f4f16848e
BLAKE2b-256 a7e8d02c8c646a7020c4574afadc3f8d3aeff4e6f236a1adfbf5299258a05240

See more details on using hashes here.

File details

Details for the file jpegtran-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: jpegtran-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 3.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.8.10

File hashes

Hashes for jpegtran-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 88f1814e8d7acddc9e801b2ea2e03067afa20f95ca36f5ed702a9c285ef25bc5
MD5 defa6a84a0fbfff0139edc9d0fb2a288
BLAKE2b-256 7b55827f5bca4014d0109e0d0a898a5e2b968a5c94972c19b7e884b236701ec6

See more details on using hashes here.

Supported by

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