pylibjpeg
A Python framework for decoding JPEG and decoding/encoding DICOM RLE data, with a focus on supporting pydicom
Decision gist · record as of 2026-08-14
Yes, if you work with compressed DICOM medical images or need JPEG/JPEG 2000/RLE decoding. Low install friction, permissive license, active maintenance, and production-stable status make it solid. Install only if you also install at least one format-specific plugin; the base package alone cannot decode or encode. No known security vulnerabilities.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python >=3.10.
- At least one format-specific plugin must be installed to decode or encode images.
- Low friction install with a single runtime dependency (numpy).
License · maintenance · safety
permissive license (permissive) — Permissive license treatment allows commercial and private use without restriction. Note that optional libjpeg plugin carries GPLv3, which has stronger copyleft requirements if used.
last release 2025-09-01 (347 days) · last repo commit 2026-04-01 · 53 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 275,669 downloads/mo, #8,172 on PyPI
Alternatives
Verify before relying
pip install pylibjpeg
from pylibjpeg import decode
# Decode a JPEG file to numpy array
arr = decode('filename.jpg')
# Or bytes
with open('filename.jpg', 'rb') as f:
arr = decode(f.read())- Performance characteristics for large medical imaging datasets.
- Exact pydicom version compatibility beyond v2.1+ stated in description.
- Whether all DICOM Transfer Syntax UIDs listed are fully supported or have limitations.
What it is and what it does
pylibjpeg is a Python framework that provides decoding and encoding for JPEG, JPEG-LS, JPEG 2000, and RLE compressed image formats. It integrates with DICOM medical imaging workflows, allowing transparent decompression of pixel data when reading DICOM files that use these compression schemes. The package can also decode JPEG images directly to numpy arrays standalone.
The package itself depends only on numpy and is lightweight. Its actual functionality requires installing one or more optional plugins: pylibjpeg-libjpeg (for JPEG variants, GPLv3), pylibjpeg-openjpeg (for JPEG 2000, MIT/BSD), or pylibjpeg-rle (for RLE, MIT). This modular design lets you install only the decoders and encoders you need. The framework is actively maintained, supports Python 3.10 through 3.14, and is classified as production-stable.
Use it for
- Read DICOM medical images compressed with JPEG Baseline or JPEG Lossless and extract pixel data.
- Decompress DICOM files using JPEG 2000 compression for downstream analysis.
- Encode pixel data to RLE Lossless format and save as compressed DICOM files.
- Standalone decoding of JPEG files to numpy arrays.
- Handle DICOM datasets with multiple compression schemes by installing plugins as needed.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you work with compressed DICOM medical images or need JPEG/JPEG 2000/RLE decoding.
Low install friction, permissive license, active maintenance, and production-stable status make it solid. Install only if you also install at least one format-specific plugin; the base package alone cannot decode or encode. No known security vulnerabilities.
Install
pylibjpeg on PyPI
Before you install
Low friction install with a single runtime dependency (numpy). Active maintenance with recent commits and production-stable status. Requires optional plugin packages to actually decode or encode specific formats.
Requires Python >=3.10. At least one format-specific plugin must be installed to decode or encode images.
License in practice
Permissive license treatment allows commercial and private use without restriction. Note that optional libjpeg plugin carries GPLv3, which has stronger copyleft requirements if used.
Quickstart
pip install pylibjpeg
from pylibjpeg import decode
# Decode a JPEG file to numpy array
arr = decode('filename.jpg')
# Or bytes
with open('filename.jpg', 'rb') as f:
arr = decode(f.read())
Verify before relying
- Performance characteristics for large medical imaging datasets.
- Exact pydicom version compatibility beyond v2.1+ stated in description.
- Whether all DICOM Transfer Syntax UIDs listed are fully supported or have limitations.
Package facts
| License | permissive license permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packagenumpy |
| Maintenance | Actively maintained 347 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 275,669 / month, #8,172 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: DevelopersIntended Audience :: Healthcare IndustryIntended Audience :: Science/ResearchLicense :: OSI Approved :: MIT LicenseNatural Language :: EnglishOperating System :: OS IndependentProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Scientific/Engineering :: Medical Science Apps.Topic :: Software Development :: Libraries |
Evidence: pylibjpeg-2.1.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “DICOM image decompression”
- pylibjpegDecodes and encodes JPEG, JPEG-LS, JPEG 2000, and RLE image formats,…
- pylibjpeg-openjpegDecodes and encodes JPEG 2000 images to and from NumPy arrays, with…
- pylibjpeg-libjpegDecodes JPEG and JPEG-LS images to NumPy arrays, with support for…
Give your agent the search over MCP, or paste the wish link into any chat.
More Libraries packages
urllib3 is an HTTP client library that provides thread-safe connection pooling, SSL/TLS verification, multipart file uploads, request retries, compression support, and proxy handling for Python applications.
Requests is a Python HTTP library that simplifies sending HTTP/1.1 requests with automatic handling of headers, authentication, cookies, and response parsing.
Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.
Install it if you're building an extensible application or framework.
Provides parsing, arithmetic, and recurrence rule computation for dates and times, with timezone support and iCalendar RFC compliance.
Install it if you need to parse flexible date strings, compute relative dates, handle timezones, or work with recurrence rules—it's the de facto choice for these tasks.
Six provides utility functions to write Python code that runs on both Python 2.7 and Python 3.3+, smoothing over language differences between the two versions.
pytest is a testing framework that lets you write test functions using plain assert statements and automatically discovers and runs them, with detailed failure reporting.
See also pydicom · pyjpegls · pylibjpeg-libjpeg · pylibjpeg-openjpeg · pylzss · python-gdcm · PyTurboJPEG · turbojpeg · dicom2nifti · highdicom