A JPEG-LS plugin for the Pillow imaging library
Project description
JPEG-LS plugin for Python Pillow
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.
Available on the Python Package Index
Usage
pip install pillow-jpls
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 ofnone
,line
orsample
bits_per_component
: override the number of bits encoded per component, otherwise taken from the image formatmaxval
: override the maximum value of any component, otherwise taken frombits_per_component
t1
t2
t3
reset
spiff
: Use a SPIFF image header, generated by default. UseNone
to just use a standard JPEG header.
Build
The build is driven by Scikit Build Core. cibuildwheel is used to generate packages using Github Actions, and C++ dependencies are satisfied by conan using cmake-conan.
pip install build
python -m build
Build without conan
To use system dependencies instead of using conan:
python -m build -C cmake.args="--preset sysdeps"
pip install dist/*.whl
Note that wheels created this way are unlikely to be portable and are suitable only for local use. A Dockerfile is provided in the root of the repository to install the prerequisites, see also the CI job that builds a wheel using only system dependencies.
Tests
A suite of tests covering the applicable conformance tests from the specification is provided.
pip install -r requirements.txt
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for pillow_jpls-1.3.2-cp312-cp312-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ac607508232cdafb09e77f5280211e25d7678152edb0885f0dd374e0b651e2c2 |
|
MD5 | e7fefb1d359ca49a4fedf6ca73130e59 |
|
BLAKE2b-256 | 8edc3f1fee71c7648f98870b657584eb30051a5c7c28ebbf94a98fe309bd7476 |
Hashes for pillow_jpls-1.3.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e837011ad129ff9d2f0c17087856eeb493b208816f41ef82daa21d7cd21fcd53 |
|
MD5 | 8091b96e92b90895a132f849ee2fbda1 |
|
BLAKE2b-256 | fc749a0f4254276376d16fd7ce4b9c11af4b65656995ef569edec1963d849de6 |
Hashes for pillow_jpls-1.3.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8b4740afc7555fb7bce95d6c507069fc0cc9800892e336dba18c5302ef7364a5 |
|
MD5 | 27a6ec6ea47a78ee971814ca6c3a99aa |
|
BLAKE2b-256 | 89627f98eeb076059ea3cd575c5c55225f0ae457bed2a46592aa3d614cb868e0 |
Hashes for pillow_jpls-1.3.2-cp312-cp312-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c822fafda531bc047068663722f86fb67083b572957b38fbc818b6339a817302 |
|
MD5 | b467be2ad5d4b456789e4494d0825251 |
|
BLAKE2b-256 | 0f563351e9777cfb3021a876ab1bd9a7553ae68601975430ddf641ea7e52c0b5 |
Hashes for pillow_jpls-1.3.2-cp312-cp312-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d64f4df3c385466aa897a1c70ffe4ecf91c611ca77f524321ddaf3969daede92 |
|
MD5 | ee0d74f33e7c3772181de29a022989d6 |
|
BLAKE2b-256 | 14cdfd25d686ff392fedb8fa6d6ea01ff4e68de80e32a4f9c05e5361446ed51a |
Hashes for pillow_jpls-1.3.2-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 91553669c4ecaf92ffa53426870190cb1b5bdf2795cddbeac1ae6fc3120c939a |
|
MD5 | 8b8c99f9db4cd8426ee9e83d251b4a13 |
|
BLAKE2b-256 | 4cd95613693e989f488a42a57ffb0e7d939d7f1dc5fee9ac5a10f1bc3f7aff2c |
Hashes for pillow_jpls-1.3.2-cp311-cp311-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a79106cc1094385ac1d8670a3bb4d5fe67a7e49d405673d241bf19535d557318 |
|
MD5 | 397d946f70e0c86eab00a07718843787 |
|
BLAKE2b-256 | ffdf8f8006fc81f8a81b8a84a4e122e35f0f8ba9ab95c7c05d837301af9d2eed |
Hashes for pillow_jpls-1.3.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a0e04d6ca24dea9763a544518fc06c737499ab9075d216776b86e054be83599c |
|
MD5 | 27460754dcd2fbcfb72bcb0696146bc0 |
|
BLAKE2b-256 | 38c200847f595281bf124e1eb3b1c46397e2092851296852cd191dbc1ea46fe2 |
Hashes for pillow_jpls-1.3.2-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 28bdb039cddb68933024330453c2692c6c595e546d0ce9305217413045fca8d4 |
|
MD5 | 00fd79a3ba33f2226ffe5b07eb0ec7d0 |
|
BLAKE2b-256 | 1c52a40460753968079e02e267076274303dbf97a540145f4e908f0c3df82d44 |
Hashes for pillow_jpls-1.3.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8a6c1e8c76b94620e0070948b91771461f7d49cc6be2575e233f6056ffe1ec26 |
|
MD5 | 7eda0982790b078e239d700b5eb2434c |
|
BLAKE2b-256 | 51c592117fdf66f36831a5121f23cec5d93997b02208ff78995279a1e7161be8 |
Hashes for pillow_jpls-1.3.2-cp311-cp311-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5f87c1cef6de984f07c08d34a84e35e69643d3bc6a3e39241089f4be38f864da |
|
MD5 | cf7e7b9313653646dd1c2410f1f689a3 |
|
BLAKE2b-256 | 7ef7deeff22e835b10683f79ec916b8a091871e5c3ad79997e6b0428403821f0 |
Hashes for pillow_jpls-1.3.2-cp311-cp311-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dea160c6e100b05c896a8434b0b9021870d7c4b055051ec637536437df218da6 |
|
MD5 | cd36ef3edb8fa55403ad40be27eb9bed |
|
BLAKE2b-256 | 338cd0b4e8bed90877ca60cbced6d18e8fdcb265f7508dbc7f09997561c1561e |
Hashes for pillow_jpls-1.3.2-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5a87864a95f0e36b32908f12251b5e8b7fa14551a89f27c916cc0e69fdc3382f |
|
MD5 | ebf258a83571998738e5208c1bc55f94 |
|
BLAKE2b-256 | 1200afdc5e35244e68e288a4e15ed09d1a690a38ce02e4a6a17da5c6e525bc72 |
Hashes for pillow_jpls-1.3.2-cp310-cp310-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ad0afb2c1676bc7d1618cf3837e9fc58997c8f0527464d9f524c19a36d666ce9 |
|
MD5 | 26c97a637a74868c85eb8cc8eb0d93dc |
|
BLAKE2b-256 | 92acfc7227b021f039d680cb0530929744b1b9392adadcd2371e1c57db9bb8d9 |
Hashes for pillow_jpls-1.3.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d1a00f77bd2d33a93082b9496c6891151fed1e1e1b915b60bdcad5f28085a9fc |
|
MD5 | 3c8c51d3f6538a2a21928400cedfdb70 |
|
BLAKE2b-256 | fd4a01112452ea9bdeeb14688b6effffe37434eb4c302fb32b04b7dfc9be8ce8 |
Hashes for pillow_jpls-1.3.2-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f346cc2f957c7b726266d46749028832351599a737bb27671eda5853784d02c3 |
|
MD5 | 267129b4f19b11cd6921701c187d5006 |
|
BLAKE2b-256 | 9efd9b6077c70f6b4183200c3d39d6a9570a943d739438edd2d8127a17f0fa03 |
Hashes for pillow_jpls-1.3.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f1ea5f90a3e30e12a5844e850393ee43acc281712bca97fd6545252d652c6f0e |
|
MD5 | fa988d92a1b362f1f88a02ee4af45dcf |
|
BLAKE2b-256 | 62a28b02be3e81e3ffc133460d4660e92f302fe7c139653d2f911a0440e2b85a |
Hashes for pillow_jpls-1.3.2-cp310-cp310-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7610b9aad5295eb6adc2e658df0dd995b38fef7d4c72c4ef63c1977989f5e701 |
|
MD5 | 9f2cb2df9bce0998a7edab2bae6282f9 |
|
BLAKE2b-256 | 50b6a4c2a376dfd376f32922d864cac691444dc4225cbdb8e1eaed4e05b1770e |
Hashes for pillow_jpls-1.3.2-cp310-cp310-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 34a8d6783a46f8f41c7c4dcd0235b3c0a893818492e8f2500b4a4e70886b5959 |
|
MD5 | e11d86d99758ca23843160ec504d59ed |
|
BLAKE2b-256 | 0987376cf046e5ba7b7ddcc385a25cca54efed9a9726ca40ab05ff2e4ebf19c1 |
Hashes for pillow_jpls-1.3.2-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 97d3265f8fcdd2add41a4ca49f464fd6e0982c0225ecbc80f30175fa04ce4e3c |
|
MD5 | b035b722c2254d836a5735186702ead8 |
|
BLAKE2b-256 | b1afd1cd84075a707cbd1f98f15e11a52c4ceb4af75fa1bea658edf286e7ff84 |
Hashes for pillow_jpls-1.3.2-cp39-cp39-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6bbb20d063fc9efe2474ba7594f203288e5bab75b0cfca32d2d4432fb9053de3 |
|
MD5 | 57bb61101dbc27711323f780da90517c |
|
BLAKE2b-256 | c9ff369c4964efddf4c376c4db36aead57f0b7ab1f87c89c3cdc2b2ab42cb058 |
Hashes for pillow_jpls-1.3.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4125954831a91f1f6484f21ef6e521ca214955322e207abb487ebb7cb7ad1b21 |
|
MD5 | b1845d36276ecb8e04a4d22076db5ef9 |
|
BLAKE2b-256 | df0be93a00179f9f67ce1ad6d2239cbf40333b0bf2bd889098295f8644a5dd96 |
Hashes for pillow_jpls-1.3.2-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 058e8ad9fce542673703ae1032dc3f4fa3aaf39a8114ce087bce0bcb3a684d95 |
|
MD5 | a8faee8b0677c395cdcc5034b518c6f9 |
|
BLAKE2b-256 | 8952aee5e836f8b4d12046fdfcb06e284230b18d43e5c329275e7afb1405a1f2 |
Hashes for pillow_jpls-1.3.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 85a42e28cac15b9e25a65588a68a1ba65ed5334a7f7a9b57bcab1223ddf65dae |
|
MD5 | bf5470d89f63fe14685825f2a465558d |
|
BLAKE2b-256 | 50cb5d53ebea188f28fbb0a0ba8ff598e9767ee1b2f07a447b12b1c69b4fa5f8 |
Hashes for pillow_jpls-1.3.2-cp39-cp39-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3aa7e3e48f5e29c22f565e677e27d029e3a302cf56b98c1115835f7c08875453 |
|
MD5 | d0961032ca9644e1ac5654fa8bbdf5b1 |
|
BLAKE2b-256 | 44d1ccde063dc27a1bbda5dae1346df17db3091e875b490ac2f09cb39956b9de |
Hashes for pillow_jpls-1.3.2-cp39-cp39-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f8956774bb9bc23aa85df733b21eaf128c1e115feedf6f37d88c1955d52c444d |
|
MD5 | 6ce0c05725d0149daee99d0e13bc8cdf |
|
BLAKE2b-256 | b0f6f1ed4cc0daed09c2ce3898b24749f2d1ad369cfb5097e2a193c0e061a403 |
Hashes for pillow_jpls-1.3.2-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0307b8506862892139a8ce3c63f34e7fd6dfed59bd6c96b677dcf7e03df815a4 |
|
MD5 | f2db8954b28922768b3ea8e2c132da43 |
|
BLAKE2b-256 | 80f2217d3a77e7b2ef6b718956ea644f65af56505402fa6368a995254d2917e8 |
Hashes for pillow_jpls-1.3.2-cp38-cp38-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 99a4c3598cf0a82885e3691307fd222b763c69c5b4a15223998679377247bc50 |
|
MD5 | 365826f959fa1abbac029149e7d1e7b7 |
|
BLAKE2b-256 | 0d8cbc76993e5305b788a9e009bc8c835124986ce6b02126d795a4b74556bb3b |
Hashes for pillow_jpls-1.3.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0eadbab278b1c54d6fa79085e0331e0db8799813e7009a6709bce4ad484e0711 |
|
MD5 | 01cafbbaf376969e401ec7c722e8fd16 |
|
BLAKE2b-256 | 24cc4685bfd544b71a8880ef2348eb277cbd821b7a4a748f19af54b2ec530071 |
Hashes for pillow_jpls-1.3.2-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 20fb78195f70ace9cdfd863cb5b3e76d9c9d2ad20aab1b4c87c0bad9aab90563 |
|
MD5 | 22171bc0ad7eccd952ef58dd932df154 |
|
BLAKE2b-256 | df610bae03cd25f27e03671d702e5487477465fde65b312e7b4945d42944f256 |
Hashes for pillow_jpls-1.3.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2d1a223a842dd97e3af324e80d07d4dbb9aa19ccab3b46b1c39e2ea231e7dd00 |
|
MD5 | ee8fd00b196ca59f47b0647f4384dd26 |
|
BLAKE2b-256 | 0b784442f66d4005b06fd06f814aedae58e8204e3b91e3c4fd9a9058ef4aae6e |
Hashes for pillow_jpls-1.3.2-cp38-cp38-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 463ee0eb8c6004fbca535f044b8f7969fa324c2ea4d992158f8bad0ff8ca91dc |
|
MD5 | 9227881a9857f14ce8193be06326c22f |
|
BLAKE2b-256 | 62558afd09a2334d0d917b02da5956321efae2c372d0a2046f4f35444511012b |
Hashes for pillow_jpls-1.3.2-cp38-cp38-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a1f1d47544bf824a6262678e5884815f6a2df8cef410bcd9365e213450a4853e |
|
MD5 | 9701b89579632768d6e82320f7b3bb40 |
|
BLAKE2b-256 | b9bf36484b6e91c9636b3869060de1f380014a452eabccc44c79eedf0fbeb0e3 |