Python wrapper for the CharLS C++ library, providing JPEG-LS lossless and near-lossless image compression. Current version 1.5.1, requires Python >=3.9. Active development with occasional releases.
pip install pyjpeglsVerified import paths — ran on the pinned version, not inferred.
Encode and decode a grayscale image with default lossless settings.
Ensure your numpy array shape is (height, width, channels) for color or (height, width) for grayscale.
Cast your array to one of the supported types before encoding: image.astype(np.uint8) or np.int16 or np.uint16.
For RGB images: ensure shape is (H, W, 3) and use InterleaveMode.SAMPLE.
Use Image.fromarray(decoded) if you need a PIL Image (after appropriate mode/format conversion).
No dependency data recorded yet.