simplejpeg
A simple package for fast JPEG encoding and decoding.
Decision gist · record as of 2026-08-14
Yes, if you need fast JPEG encoding/decoding with direct memory access and are comfortable with a compiled dependency. The medium install friction is offset by pre-built wheels for common platforms and active maintenance. No known vulnerabilities. MIT license is permissive. Not recommended if you need a lightweight pure-Python solution or broad format support beyond JPEG.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires numpy; compiled extension requires libturbojpeg at runtime (bundled in wheels on supported platforms).
- Medium install friction due to compiled C extension; pre-built wheels cover common platforms (Linux x64/arm64, Windows x64/arm64, macOS 10.9+ x64/arm64) for Python 3.10–3.13.
- Source builds require cmake and an assembler (nasm or yasm).
License · maintenance · safety
MIT (permissive) — MIT license permits commercial and private use with minimal restrictions; include a copy of the license in distributions.
last release 2025-10-10 (308 days) · last repo commit 2026-03-01 · 10 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 326,134 downloads/mo, #7,579 on PyPI
Alternatives
Verify before relying
import simplejpeg
import numpy as np
# Decode from bytes
jpeg_bytes = open('image.jpg', 'rb').read()
image = simplejpeg.decode_jpeg(jpeg_bytes, colorspace='RGB')
# Encode back to JPEG
encoded = simplejpeg.encode_jpeg(image, quality=85)- Whether the bundled libturbojpeg version in wheels is current and receives security updates independently.
- Performance comparison with Pillow and OpenCV under real-world workloads to validate the speed claims in the description.
What it is and what it does
simplejpeg is a thin wrapper around libturbojpeg that provides fast JPEG encoding and decoding directly from memory. It accepts JPEG data as bytes or any object supporting the buffer protocol, and returns decoded images as numpy arrays in your choice of colorspace (RGB, BGR, GRAY, CMYK, etc.). It also offers functions to inspect JPEG headers without full decompression and to encode numpy arrays back to JPEG with control over quality and color subsampling.
The package is designed for developers who prioritize speed and direct memory access over convenience. Unlike Pillow, it avoids the overhead of stream wrappers; unlike OpenCV, it returns images in standard RGB by default and has a smaller footprint. It exposes advanced features of libturbojpeg such as fast DCT modes and direct YUV plane encoding, making it useful for batch processing, video pipelines, and resource-constrained environments.
Use it for
- Batch decode thousands of JPEG files into numpy arrays for machine learning pipelines with minimal overhead.
- Inspect JPEG dimensions and colorspace metadata at 100000+ images per second without full decompression.
- Encode video frames or scientific data to JPEG with fine-grained control over quality and subsampling.
- Process YUV420 video frames directly from OpenCV without RGB conversion overhead.
- Build high-throughput image servers that need to read and write JPEG data from memory buffers.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need fast JPEG encoding/decoding with direct memory access and are comfortable with a compiled dependency.
The medium install friction is offset by pre-built wheels for common platforms and active maintenance. No known vulnerabilities. MIT license is permissive. Not recommended if you need a lightweight pure-Python solution or broad format support beyond JPEG.
Install
simplejpeg on PyPI
Before you install
Medium install friction due to compiled C extension; pre-built wheels cover common platforms (Linux x64/arm64, Windows x64/arm64, macOS 10.9+ x64/arm64) for Python 3.10–3.13. Source builds require cmake and an assembler (nasm or yasm). Actively maintained with recent commits.
Requires numpy; compiled extension requires libturbojpeg at runtime (bundled in wheels on supported platforms).
License in practice
MIT license permits commercial and private use with minimal restrictions; include a copy of the license in distributions.
Quickstart
import simplejpeg
import numpy as np
# Decode from bytes
jpeg_bytes = open('image.jpg', 'rb').read()
image = simplejpeg.decode_jpeg(jpeg_bytes, colorspace='RGB')
# Encode back to JPEG
encoded = simplejpeg.encode_jpeg(image, quality=85)
Verify before relying
- Whether the bundled libturbojpeg version in wheels is current and receives security updates independently.
- Performance comparison with Pillow and OpenCV under real-world workloads to validate the speed claims in the description.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.9 |
| Install friction | Medium. Platform-specific wheel |
| Runtime dependencies | 1 packagenumpy |
| Maintenance | Actively maintained 308 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 326,134 / month, #7,579 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 :: Science/Research |
Evidence: simplejpeg-1.9.0-cp310-cp310-macosx_10_9_x86_64.whl; simplejpeg-1.9.0-cp310-cp310-macosx_11_0_arm64.whl; simplejpeg-1.9.0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; simplejpeg-1.9.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; simplejpeg-1.9.0-cp310-cp310-win_amd64.whl; simplejpeg-1.9.0-cp311-cp311-macosx_10_9_x86_64.whl; simplejpeg-1.9.0-cp311-cp311-macosx_11_0_arm64.whl; simplejpeg-1.9.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; simplejpeg-1.9.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; simplejpeg-1.9.0-cp311-cp311-win_amd64.whl; simplejpeg-1.9.0-cp311-cp311-win_arm64.whl; simplejpeg-1.9.0-cp312-cp312-macosx_10_13_x86_64.whl; simplejpeg-1.9.0-cp312-cp312-macosx_11_0_arm64.whl; simplejpeg-1.9.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; simplejpeg-1.9.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; simplejpeg-1.9.0-cp312-cp312-win_amd64.whl; simplejpeg-1.9.0-cp312-cp312-win_arm64.whl; simplejpeg-1.9.0-cp313-cp313-macosx_10_13_x86_64.whl; simplejpeg-1.9.0-cp313-cp313-macosx_11_0_arm64.whl; simplejpeg-1.9.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.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 › “fast JPEG encoding decoding”
- simplejpegEncodes and decodes JPEG images directly to and from memory using…
- PyTurboJPEGPyTurboJPEG wraps libjpeg-turbo to decode and encode JPEG images…
- pylibjpeg-openjpegDecodes and encodes JPEG 2000 images to and from NumPy arrays, with…
Give your agent the search over MCP, or paste the wish link into any chat.
More Graphics packages
Pillow adds image processing capabilities to Python, providing file format support, efficient pixel data handling, and image manipulation operations.
Install it if you need to work with images in Python—it is the de facto standard for this task.
fonttools manipulates font files in multiple formats (TrueType, OpenType, AFM, Type 1, Mac-specific) and includes TTX, a tool to convert fonts to and from XML text format.
Install it if you need to read, write, or manipulate fonts programmatically or via the TTX command-line tool.
Enables matplotlib figures to display inline directly within Jupyter notebooks and IPython environments instead of in separate windows.
PyMuPDF extracts, renders, converts, and manipulates PDF and other document formats (XPS, EPUB, images, Office files via Pro) with high performance, providing text, tables, images, and metadata with precise layout information.
The AGPL license requires careful review if you are building proprietary software—commercial licensing is available from Artifex.
pypdfium2 is a Python binding to PDFium that enables PDF rendering, inspection, manipulation, and creation through a ctypes interface to Google's PDFium library.
Install it if you need PDF rendering, inspection, or manipulation in Python; the medium install friction is offset by comprehensive platform support.
Altair is a declarative Python library for creating interactive statistical visualizations by writing simple, readable code that compiles to Vega-Lite specifications.
See also PyTurboJPEG · pylibjpeg-libjpeg · pillow-jxl-plugin · pylibjpeg-openjpeg · pylibjpeg · qoi · turbojpeg · colorspacious · pyjpegls · texture2ddecoder