Skip to main content

A JPEG-LS plugin for the Pillow imaging library

Project description

JPEG-LS plugin for Python Pillow

Build status

A plugin for the Python Pillow imaging library for the JPEG-LS codec, based on the Charls JPEG-LS implemetation. Python bindings implemented using pybind11.

Usage

pip install .

With Pillow

import pillow_jpls
from PIL import Image
from io import BytesIO

img = Image.open("image.jls")
img.save("image_copy.jls)

# Saving to a buffer
buffer = BytesIO()
img.save(buffer, "JPEG-LS")

Options

The encoder supports the following options. See the specification for details, and the tests for example usage.

  • near_lossless : 0 is lossless - the default.
  • interleave : one of none, line or sample
  • bits_per_component : override the number of bits encoded per component, otherwise taken from the image format
  • maxval: override the maximum value of any component, otherwise taken from bits_per_component
  • t1
  • t2
  • t3
  • reset

Build

The build is driven by PEP 517 and Scikit Build. cibuildwheel is used to generate packages using Github Actions.

pip install pep517
python -m pep517.build --binary .

Tests

A suite of tests covering the applicable conformance tests from the specification is provided. You will need git-lfs to clone the data.

pip install pytest .
pytest -v test

Limitations

16 bit multichannel images are not supported, as these are not supported in Pillow. 16bit greyscale images are supported, however.

References

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

pillow_jpls-1.0.0-pp37-pypy37_pp73-manylinux2010_x86_64.whl (305.9 kB view hashes)

Uploaded PyPy manylinux: glibc 2.12+ x86-64

pillow_jpls-1.0.0-pp37-pypy37_pp73-macosx_10_15_x86_64.whl (226.1 kB view hashes)

Uploaded PyPy macOS 10.15+ x86-64

pillow_jpls-1.0.0-pp36-pypy36_pp73-manylinux2010_x86_64.whl (305.9 kB view hashes)

Uploaded PyPy manylinux: glibc 2.12+ x86-64

pillow_jpls-1.0.0-pp36-pypy36_pp73-macosx_10_15_x86_64.whl (226.1 kB view hashes)

Uploaded PyPy macOS 10.15+ x86-64

pillow_jpls-1.0.0-cp39-cp39-win_amd64.whl (194.9 kB view hashes)

Uploaded CPython 3.9 Windows x86-64

pillow_jpls-1.0.0-cp39-cp39-win32.whl (171.6 kB view hashes)

Uploaded CPython 3.9 Windows x86

pillow_jpls-1.0.0-cp39-cp39-manylinux2010_x86_64.whl (308.1 kB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.12+ x86-64

pillow_jpls-1.0.0-cp39-cp39-manylinux2010_i686.whl (295.1 kB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.12+ i686

pillow_jpls-1.0.0-cp39-cp39-macosx_10_15_x86_64.whl (227.8 kB view hashes)

Uploaded CPython 3.9 macOS 10.15+ x86-64

pillow_jpls-1.0.0-cp38-cp38-win_amd64.whl (194.7 kB view hashes)

Uploaded CPython 3.8 Windows x86-64

pillow_jpls-1.0.0-cp38-cp38-win32.whl (171.5 kB view hashes)

Uploaded CPython 3.8 Windows x86

pillow_jpls-1.0.0-cp38-cp38-manylinux2010_x86_64.whl (307.7 kB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.12+ x86-64

pillow_jpls-1.0.0-cp38-cp38-manylinux2010_i686.whl (294.5 kB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.12+ i686

pillow_jpls-1.0.0-cp38-cp38-macosx_10_15_x86_64.whl (227.7 kB view hashes)

Uploaded CPython 3.8 macOS 10.15+ x86-64

pillow_jpls-1.0.0-cp37-cp37m-win_amd64.whl (196.2 kB view hashes)

Uploaded CPython 3.7m Windows x86-64

pillow_jpls-1.0.0-cp37-cp37m-win32.whl (171.9 kB view hashes)

Uploaded CPython 3.7m Windows x86

pillow_jpls-1.0.0-cp37-cp37m-manylinux2010_x86_64.whl (306.6 kB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.12+ x86-64

pillow_jpls-1.0.0-cp37-cp37m-manylinux2010_i686.whl (295.4 kB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.12+ i686

pillow_jpls-1.0.0-cp37-cp37m-macosx_10_15_x86_64.whl (224.9 kB view hashes)

Uploaded CPython 3.7m macOS 10.15+ x86-64

pillow_jpls-1.0.0-cp36-cp36m-win_amd64.whl (196.2 kB view hashes)

Uploaded CPython 3.6m Windows x86-64

pillow_jpls-1.0.0-cp36-cp36m-win32.whl (171.8 kB view hashes)

Uploaded CPython 3.6m Windows x86

pillow_jpls-1.0.0-cp36-cp36m-manylinux2010_x86_64.whl (306.5 kB view hashes)

Uploaded CPython 3.6m manylinux: glibc 2.12+ x86-64

pillow_jpls-1.0.0-cp36-cp36m-manylinux2010_i686.whl (295.3 kB view hashes)

Uploaded CPython 3.6m manylinux: glibc 2.12+ i686

pillow_jpls-1.0.0-cp36-cp36m-macosx_10_15_x86_64.whl (224.9 kB view hashes)

Uploaded CPython 3.6m macOS 10.15+ x86-64

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