skillfed

pylibjpeg-libjpeg

A Python wrapper for libjpeg, with a focus on use as a plugin for for pylibjpeg

pylibjpeg-libjpeg v2.4.0 251.4K downloads/30d#8,584 on PyPI17
Copyleft license GPL V3.0 Active released

What it is and what it does

pylibjpeg-libjpeg is a Python wrapper around Thomas Richter's libjpeg library, designed primarily as a plugin for the pylibjpeg ecosystem and pydicom. It decodes JPEG and JPEG-LS images into NumPy arrays, supporting both standalone use and integration with DICOM workflows. The package handles multiple DICOM transfer syntaxes including JPEG Baseline, JPEG Extended, JPEG Lossless, and JPEG-LS variants.

The package is built on compiled C++ bindings and ships with pre-built wheels for modern Python versions (3.10–3.13) across Linux, macOS, and Windows, reducing installation complexity for most users. It depends only on NumPy and is maintained as part of the pydicom project. Encoding is not currently supported; the focus is on decoding medical and standard JPEG formats.

Use it for:

  • Decompress JPEG-encoded DICOM medical images within a pydicom workflow
  • Decode JPEG-LS lossless images for archival or diagnostic imaging applications
  • Standalone conversion of JPEG files to NumPy arrays for scientific image processing
  • Plugin integration with pylibjpeg to support multiple JPEG codecs in a single application
  • Batch processing of DICOM datasets with JPEG-compressed pixel data

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Decodes JPEG and JPEG-LS images to NumPy arrays, with support for multiple DICOM transfer syntaxes and integration with pylibjpeg and pydicom.

Yes, if you need JPEG or JPEG-LS decoding in a DICOM or scientific imaging context. The package is actively maintained, has no known vulnerabilities, and offers broad platform support. The GPL v3.0 copyleft license is a hard blocker for closed-source projects; open-source and research users should install without hesitation. Encoding is not supported, so it is not suitable for JPEG generation workflows.

Install

pylibjpeg-libjpeg on PyPI

pip

pip install pylibjpeg-libjpeg

uv

uv add pylibjpeg-libjpeg

poetry

poetry add pylibjpeg-libjpeg

Installing pylibjpeg-libjpeg

Before you install

Pre-built wheels available for Python 3.10–3.13 on Linux, macOS, and Windows reduce install friction. Repository is active with recent commits. Medium install friction reflects compiled C++ bindings; development builds require Microsoft C++ Build Tools on Windows.

License in practice

Licensed under GPL v3.0 (copyleft). Any derivative work or distribution must comply with copyleft obligations; proprietary or closed-source projects should review compatibility before use.

Quickstart

from libjpeg import decode
import numpy as np

# Decode JPEG file to NumPy array
arr = decode('filename.jpg')

# Or with file object
with open('filename.jpg', 'rb') as f:
    arr = decode(f.read())

Requires Python 3.10 or later; NumPy must be installed. On Windows, development builds require Microsoft C++ Build Tools.

Verify before relying

  • Performance characteristics (decode speed, memory usage) relative to other JPEG decoders
  • Completeness of JPEG-LS support and any known limitations
  • Stability and bug-fix frequency beyond the stated active maintenance status

Package facts

License GPL V3.0 (copyleft)
Python support supports the current Python release (<4.0,>=3.10)
Install friction medium — platform-specific wheel
Runtime dependencies 1 — numpy
Maintenance actively maintained — 160 days since the last release
Last repo commit
First released
Downloads 251,404/month — #8,584 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: pylibjpeg_libjpeg-2.4.0-cp310-cp310-macosx_10_9_x86_64.whl; pylibjpeg_libjpeg-2.4.0-cp310-cp310-macosx_11_0_arm64.whl; pylibjpeg_libjpeg-2.4.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl; pylibjpeg_libjpeg-2.4.0-cp310-cp310-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl; pylibjpeg_libjpeg-2.4.0-cp310-cp310-win32.whl; pylibjpeg_libjpeg-2.4.0-cp310-cp310-win_amd64.whl; pylibjpeg_libjpeg-2.4.0-cp311-cp311-macosx_10_9_x86_64.whl; pylibjpeg_libjpeg-2.4.0-cp311-cp311-macosx_11_0_arm64.whl; pylibjpeg_libjpeg-2.4.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl; pylibjpeg_libjpeg-2.4.0-cp311-cp311-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl; pylibjpeg_libjpeg-2.4.0-cp311-cp311-win32.whl; pylibjpeg_libjpeg-2.4.0-cp311-cp311-win_amd64.whl; pylibjpeg_libjpeg-2.4.0-cp312-cp312-macosx_10_13_x86_64.whl; pylibjpeg_libjpeg-2.4.0-cp312-cp312-macosx_11_0_arm64.whl; pylibjpeg_libjpeg-2.4.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl; pylibjpeg_libjpeg-2.4.0-cp312-cp312-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl; pylibjpeg_libjpeg-2.4.0-cp312-cp312-win32.whl; pylibjpeg_libjpeg-2.4.0-cp312-cp312-win_amd64.whl; pylibjpeg_libjpeg-2.4.0-cp313-cp313-macosx_10_13_x86_64.whl; pylibjpeg_libjpeg-2.4.0-cp313-cp313-macosx_11_0_arm64.whl

Keywords: dicom, pydicom, python, jpg, jpeg, jpg-ls, jpeg-ls, libjpeg, pylibjpeg

Development Status :: 5 - Production/StableIntended Audience :: DevelopersIntended Audience :: Healthcare IndustryIntended Audience :: Science/ResearchLicense :: OSI Approved :: GNU General Public License v3 (GPLv3)License :: Other/Proprietary LicenseNatural Language :: EnglishOperating System :: MacOS :: MacOS XOperating System :: Microsoft :: WindowsOperating System :: POSIX :: LinuxProgramming Language :: C++Programming Language :: Python :: 3Programming 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

Tags

jpeg decoding pythonjpeg-ls decoderdicom jpeg decompressionlibjpeg python wrappermedical image jpegnumpy jpeg decoderpydicom jpeg plugin
medical-imagingdicomimage-codec

More Libraries packages