skillfed

rawpy

RAW image processing for Python, a wrapper for libraw

rawpy v0.27.0 532.0K downloads/30d#6,151 on PyPI814
Permissive license MIT Active released

What it is and what it does

rawpy is a Python wrapper around the LibRaw C++ library that handles the low-level decoding of RAW image files from digital cameras. It lets you load RAW files (NEF, CR2, ARW, DNG, and many others), extract metadata and embedded thumbnails, and apply postprocessing such as demosaicing, white balance, gamma correction, and output bit depth control. The package also includes utilities in the `rawpy.enhance` module for detecting and repairing hot and dead pixels across multiple images.

The library is built as precompiled wheels for Python 3.9 through 3.14 on Linux, macOS, and Windows, with optional features like LCMS color management and OpenMP acceleration available on most platforms. It depends only on numpy and is designed for straightforward use in image processing pipelines, from simple one-line postprocessing to advanced workflows involving pixel repair and batch processing.

Use it for:

  • Load and postprocess RAW files from digital cameras with custom white balance, gamma, and bit depth settings.
  • Extract and save embedded thumbnail images from RAW files without full decoding.
  • Identify and repair hot/dead pixels across a series of RAW images using statistical analysis.
  • Build batch RAW processing pipelines that apply consistent postprocessing parameters to multiple images.
  • Access raw sensor data and metadata for scientific or forensic image analysis.

Worth the install?

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

rawpy wraps LibRaw to load, decode, and postprocess RAW image files from digital cameras, with built-in functions for finding and repairing hot and dead pixels.

Yes. rawpy is actively maintained, has no known vulnerabilities, and provides the most straightforward Python interface to LibRaw for RAW image processing. Install it if you need to work with RAW files from digital cameras. Be aware of the medium install friction (compiled wheels) and the Linux multiprocessing fork() caveat documented in the FAQ.

Install

rawpy on PyPI

pip

pip install rawpy

uv

uv add rawpy

poetry

poetry add rawpy

Installing rawpy

Before you install

Medium install friction due to compiled wheels for multiple Python versions (3.9–3.14) and platforms. Package is actively maintained with recent commits and no known vulnerabilities. Depends only on numpy, keeping the dependency tree lean.

License in practice

MIT license is permissive and imposes no restrictions on use, modification, or distribution. Note that GPL demosaic packs are intentionally excluded from wheels due to license incompatibility with MIT.

Quickstart

pip install rawpy

import rawpy
import numpy

with rawpy.imread('image.nef') as raw:
    rgb = raw.postprocess()

LibRaw library must be available on the system; on Linux, manual installation from source may be required if the system package is outdated or missing.

Verify before relying

  • Whether all supported camera models and RAW formats are documented or queryable at runtime.
  • Performance characteristics when processing large batches of RAW files or very high-resolution images.
  • Stability and thread-safety guarantees beyond the documented multiprocessing fork() caveat.

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.9)
Install friction medium — platform-specific wheel
Runtime dependencies 1 — numpy
Maintenance actively maintained — 99 days since the last release
Last repo commit
First released
Downloads 531,979/month — #6,151 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: rawpy-0.27.0-cp310-cp310-macosx_11_0_arm64.whl; rawpy-0.27.0-cp310-cp310-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl; rawpy-0.27.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl; rawpy-0.27.0-cp310-cp310-win_amd64.whl; rawpy-0.27.0-cp311-cp311-macosx_11_0_arm64.whl; rawpy-0.27.0-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl; rawpy-0.27.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl; rawpy-0.27.0-cp311-cp311-win_amd64.whl; rawpy-0.27.0-cp312-cp312-macosx_11_0_arm64.whl; rawpy-0.27.0-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl; rawpy-0.27.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl; rawpy-0.27.0-cp312-cp312-win_amd64.whl; rawpy-0.27.0-cp313-cp313-macosx_11_0_arm64.whl; rawpy-0.27.0-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl; rawpy-0.27.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl; rawpy-0.27.0-cp313-cp313-win_amd64.whl; rawpy-0.27.0-cp314-cp314-macosx_11_0_arm64.whl; rawpy-0.27.0-cp314-cp314-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl; rawpy-0.27.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl; rawpy-0.27.0-cp314-cp314-win_amd64.whl

Development Status :: 4 - BetaIntended Audience :: DevelopersNatural Language :: EnglishOperating System :: MacOSOperating System :: Microsoft :: WindowsOperating System :: POSIXOperating System :: UnixProgramming Language :: CythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.9Topic :: Multimedia :: GraphicsTopic :: Software Development :: Libraries

Tags

raw image processing pythonlibraw wrappercamera raw file readerraw postprocessinghot pixel repairraw image decoderdigital camera raw support
image-processingraw-photographylibraw-binding

More Libraries packages