Skip to main content
Linux/macOS Build Status Windows Build Status

rawpy is an easy-to-use Python wrapper for the LibRaw library. It also contains some extra functionality for finding and repairing hot/dead pixels.

API Documentation

Jupyter notebook tutorials

Sample code

Load a RAW file and save the postprocessed image using default parameters:

import rawpy
import imageio

path = 'image.nef'
with rawpy.imread(path) as raw:
    rgb = raw.postprocess()
imageio.imsave('default.tiff', rgb)

Save as 16-bit linear image:

with rawpy.imread(path) as raw:
    rgb = raw.postprocess(gamma=(1,1), no_auto_bright=True, output_bps=16)
imageio.imsave('linear.tiff', rgb)

Find bad pixels using multiple RAW files and repair them:

import rawpy.enhance

paths = ['image1.nef', 'image2.nef', 'image3.nef']
bad_pixels = rawpy.enhance.find_bad_pixels(paths)

for path in paths:
    with rawpy.imread(path) as raw:
        rawpy.enhance.repair_bad_pixels(raw, bad_pixels, method='median')
        rgb = raw.postprocess()
    imageio.imsave(path + '.tiff', rgb)

Installation

Binary wheels for Linux, macOS, and Windows are provided for Python 2.7, 3.4, 3.5, and 3.6. These can be installed with a simple pip install rawpy. Currently, Linux and macOS wheels are only available as 64 bit versions.

Installation from source on Linux/macOS

If you have the need to use a specific libraw version or you can’t use the provided binary wheels then follow the steps in this section to build rawpy from source.

First, install the LibRaw library on your system.

On Ubuntu, you can get (an outdated) version with:

sudo apt-get install libraw-dev

Or install the latest release version from the source repository:

git clone https://github.com/LibRaw/LibRaw.git libraw
git clone https://github.com/LibRaw/LibRaw-cmake.git libraw-cmake
cd libraw
git checkout 0.19.0
cp -R ../libraw-cmake/* .
cmake .
sudo make install

After that, install rawpy using pip install rawpy --no-binary rawpy.

If you get the error “ImportError: libraw.so: cannot open shared object file: No such file or directory” when trying to use rawpy, then do the following:

echo "/usr/local/lib" | sudo tee /etc/ld.so.conf.d/99local.conf
sudo ldconfig

The LibRaw library is installed in /usr/local/lib (if installed manually) and apparently this folder is not searched for libraries by default in some Linux distributions.

NumPy Dependency

rawpy depends on NumPy. The minimum supported NumPy version depends on your Python version:

Python

NumPy

2.7

>= 1.7

3.4

>= 1.8

3.5

>= 1.9

3.6

>= 1.11

3.7

>= 1.14

Metadata

Release files for rawpy 0.13.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for rawpy 0.13.0
File
rawpy-0.13.0-cp37-cp37m-win_amd64.whl CPython 3.7 CPython 3.7 pymalloc Windows x86-64 Details
rawpy-0.13.0-cp37-cp37m-win32.whl CPython 3.7 CPython 3.7 pymalloc Windows x86-32 Details
rawpy-0.13.0-cp37-cp37m-manylinux1_x86_64.whl CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.5+ x86-64 Details
rawpy-0.13.0-cp37-cp37m-macosx_10_10_x86_64.whl CPython 3.7 CPython 3.7 pymalloc macOS 10.10+ x86-64 Details
rawpy-0.13.0-cp36-cp36m-win_amd64.whl CPython 3.6 CPython 3.6 pymalloc Windows x86-64 Details
rawpy-0.13.0-cp36-cp36m-win32.whl CPython 3.6 CPython 3.6 pymalloc Windows x86-32 Details
rawpy-0.13.0-cp36-cp36m-manylinux1_x86_64.whl CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.5+ x86-64 Details
rawpy-0.13.0-cp36-cp36m-macosx_10_10_x86_64.whl CPython 3.6 CPython 3.6 pymalloc macOS 10.10+ x86-64 Details
rawpy-0.13.0-cp35-cp35m-win_amd64.whl CPython 3.5 CPython 3.5 pymalloc Windows x86-64 Details
rawpy-0.13.0-cp35-cp35m-win32.whl CPython 3.5 CPython 3.5 pymalloc Windows x86-32 Details
rawpy-0.13.0-cp35-cp35m-manylinux1_x86_64.whl CPython 3.5 CPython 3.5 pymalloc Linux glibc 2.5+ x86-64 Details
rawpy-0.13.0-cp35-cp35m-macosx_10_10_x86_64.whl CPython 3.5 CPython 3.5 pymalloc macOS 10.10+ x86-64 Details
rawpy-0.13.0-cp34-cp34m-win_amd64.whl CPython 3.4 CPython 3.4 pymalloc Windows x86-64 Details
rawpy-0.13.0-cp34-cp34m-win32.whl CPython 3.4 CPython 3.4 pymalloc Windows x86-32 Details
rawpy-0.13.0-cp34-cp34m-manylinux1_x86_64.whl CPython 3.4 CPython 3.4 pymalloc Linux glibc 2.5+ x86-64 Details
rawpy-0.13.0-cp34-cp34m-macosx_10_10_x86_64.whl CPython 3.4 CPython 3.4 pymalloc macOS 10.10+ x86-64 Details
rawpy-0.13.0-cp27-cp27mu-manylinux1_x86_64.whl CPython 2.7 CPython 2.7 pymalloc wide-unicode Linux glibc 2.5+ x86-64 Details
rawpy-0.13.0-cp27-cp27m-win_amd64.whl CPython 2.7 CPython 2.7 pymalloc Windows x86-64 Details
rawpy-0.13.0-cp27-cp27m-win32.whl CPython 2.7 CPython 2.7 pymalloc Windows x86-32 Details
rawpy-0.13.0-cp27-cp27m-macosx_10_10_x86_64.whl CPython 2.7 CPython 2.7 pymalloc macOS 10.10+ x86-64 Details

Total release size: 10.5 MB

Release files / rawpy-0.13.0-cp37-cp37m-win_amd64.whl

Download URL rawpy-0.13.0-cp37-cp37m-win_amd64.whl
Size 544.2 kB
Tags CPython 3.7 CPython 3.7 pymalloc Windows x86-64
SHA-256 checksum
How to use checksums
9b51ee056298129c3ee2a08eed2b11951b5f5e086382eaa67d2c3841c884e3be
BLAKE2b-256 checksum
How to use checksums
85e44ee21659002b17a85937a34e2e37794cc3c835f18af295c16b885e58b392
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Python-urllib/3.7

Release files / rawpy-0.13.0-cp37-cp37m-win32.whl

Download URL rawpy-0.13.0-cp37-cp37m-win32.whl
Size 473.0 kB
Tags CPython 3.7 CPython 3.7 pymalloc Windows x86-32
SHA-256 checksum
How to use checksums
8461878c266947db5037915c69f7a5bdf8e75744e92bc2fe099cf2e6c0bd34ab
BLAKE2b-256 checksum
How to use checksums
6b9c95d165e1dc32c49df3a52de22f51d8cb164275b45c75d5738f24b256f4c2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Python-urllib/3.7

Release files / rawpy-0.13.0-cp37-cp37m-manylinux1_x86_64.whl

Download URL rawpy-0.13.0-cp37-cp37m-manylinux1_x86_64.whl
Size 681.9 kB
Tags CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
bbacd3db0eddff50dbe17c4c6a0377bbb69bc2ab0be73a8afe1a2de2ceeb0b53
BLAKE2b-256 checksum
How to use checksums
3d0448c0a6bf9966766a329b863051f3311b7961461b3caaa68dfd976ebf443e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/2.7.15

Release files / rawpy-0.13.0-cp37-cp37m-macosx_10_10_x86_64.whl

Download URL rawpy-0.13.0-cp37-cp37m-macosx_10_10_x86_64.whl
Size 542.8 kB
Tags CPython 3.7 CPython 3.7 pymalloc macOS 10.10+ x86-64
SHA-256 checksum
How to use checksums
00bb9ecd2388eae3f01d01f3fb83b3949ee7b4de842a394116be7171ac6fe027
BLAKE2b-256 checksum
How to use checksums
b07cc8e1e6f002293563f046e931bd4caf8cb57a41ad95834dc8f45e2abe29c3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1

Release files / rawpy-0.13.0-cp36-cp36m-win_amd64.whl

Download URL rawpy-0.13.0-cp36-cp36m-win_amd64.whl
Size 541.9 kB
Tags CPython 3.6 CPython 3.6 pymalloc Windows x86-64
SHA-256 checksum
How to use checksums
c93c348d0bf7f4bb7fad153da55bbc313e956a2d5f5355f1e2c13a99b8f70f5d
BLAKE2b-256 checksum
How to use checksums
d40675e5d0e79f92759a1513bfef301dcc3cd6fc973b4d1b9cbb59eae0d212d5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Python-urllib/3.6

Release files / rawpy-0.13.0-cp36-cp36m-win32.whl

Download URL rawpy-0.13.0-cp36-cp36m-win32.whl
Size 471.8 kB
Tags CPython 3.6 CPython 3.6 pymalloc Windows x86-32
SHA-256 checksum
How to use checksums
ab7b9e245a9cd932b32b32685a03fe34e0aa9c188b020c7cea02e897cb299d6a
BLAKE2b-256 checksum
How to use checksums
48db815bc78c40d061eff31a17f4bc23844e72675ff8b41cf60b26a0f4087966
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Python-urllib/3.6

Release files / rawpy-0.13.0-cp36-cp36m-manylinux1_x86_64.whl

Download URL rawpy-0.13.0-cp36-cp36m-manylinux1_x86_64.whl
Size 682.6 kB
Tags CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
e924d21677683beba054958c3da22200cd327b23f25d3028f9d2d611e0143558
BLAKE2b-256 checksum
How to use checksums
791e63007c7c6efff9ad42832505c6f98866184eb2c55ea66bc79760aa602f8e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/2.7.15

Release files / rawpy-0.13.0-cp36-cp36m-macosx_10_10_x86_64.whl

Download URL rawpy-0.13.0-cp36-cp36m-macosx_10_10_x86_64.whl
Size 542.4 kB
Tags CPython 3.6 CPython 3.6 pymalloc macOS 10.10+ x86-64
SHA-256 checksum
How to use checksums
689aa808a3c7594516b30cdffc956a31c1f7cfd951f53330f2866fe065b6c8b4
BLAKE2b-256 checksum
How to use checksums
cb839db00150ead070c9e659445e3e0ea9abbc0d6640d51016e27059bee09ae4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.7

Release files / rawpy-0.13.0-cp35-cp35m-win_amd64.whl

Download URL rawpy-0.13.0-cp35-cp35m-win_amd64.whl
Size 531.2 kB
Tags CPython 3.5 CPython 3.5 pymalloc Windows x86-64
SHA-256 checksum
How to use checksums
8ba37972c11e6776d4766ef7cdee04b7b5c3c3d1623d064cec37a7714f1a4e44
BLAKE2b-256 checksum
How to use checksums
dd6c24b635b0ea5e0c64d5dbb4d246032af2c5e5d5c312882dd7b2dcc212d7af
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Python-urllib/3.5

Release files / rawpy-0.13.0-cp35-cp35m-win32.whl

Download URL rawpy-0.13.0-cp35-cp35m-win32.whl
Size 461.6 kB
Tags CPython 3.5 CPython 3.5 pymalloc Windows x86-32
SHA-256 checksum
How to use checksums
6333f3a4a73272d4cb1b300f747449c50f641fc834c00cfeb47ec4d393493621
BLAKE2b-256 checksum
How to use checksums
28bdb35a65e1ea026c68733b524dbe231a95541484c5995d2bd068299153f8ce
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Python-urllib/3.5

Release files / rawpy-0.13.0-cp35-cp35m-manylinux1_x86_64.whl

Download URL rawpy-0.13.0-cp35-cp35m-manylinux1_x86_64.whl
Size 672.4 kB
Tags CPython 3.5 CPython 3.5 pymalloc Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
579ceb493fb013bbaf22ab5579caa399a9c8ebacd7db9712be304285381d1a7f
BLAKE2b-256 checksum
How to use checksums
746a0f1aa1ba5025bd79d493973284c161f6a04c3d85a64ac9ebd55f2dca10aa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/2.7.15

Release files / rawpy-0.13.0-cp35-cp35m-macosx_10_10_x86_64.whl

Download URL rawpy-0.13.0-cp35-cp35m-macosx_10_10_x86_64.whl
Size 532.6 kB
Tags CPython 3.5 CPython 3.5 pymalloc macOS 10.10+ x86-64
SHA-256 checksum
How to use checksums
3e99762591c7ee603cb22e1bbb0367c69e3e5692b4c954b95652aacb3541b6ca
BLAKE2b-256 checksum
How to use checksums
e8c3d762d7f6ac9fe78c6486e9f181effe528a7797cdb9d1287eff867b6e609f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.5.6

Release files / rawpy-0.13.0-cp34-cp34m-win_amd64.whl

Download URL rawpy-0.13.0-cp34-cp34m-win_amd64.whl
Size 369.1 kB
Tags CPython 3.4 CPython 3.4 pymalloc Windows x86-64
SHA-256 checksum
How to use checksums
a28dd1cdb07ba8f52c61e5b5d1f7d107f24778d39ae1f9324ca71275485b7b35
BLAKE2b-256 checksum
How to use checksums
c5d9b69f276a3f18d11e75d0d51f8f3ed44051928c8c98c7e0a57a68069236c3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Python-urllib/3.4

Release files / rawpy-0.13.0-cp34-cp34m-win32.whl

Download URL rawpy-0.13.0-cp34-cp34m-win32.whl
Size 332.7 kB
Tags CPython 3.4 CPython 3.4 pymalloc Windows x86-32
SHA-256 checksum
How to use checksums
b0b8b19730f23982833a8d69e7a9125e19296ad61469b2015ea5226cf0e46794
BLAKE2b-256 checksum
How to use checksums
3384b25068edede22429d10d57a3628e7fcc11385f30929f19ed5966fe9c3e12
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Python-urllib/3.4

Release files / rawpy-0.13.0-cp34-cp34m-manylinux1_x86_64.whl

Download URL rawpy-0.13.0-cp34-cp34m-manylinux1_x86_64.whl
Size 664.5 kB
Tags CPython 3.4 CPython 3.4 pymalloc Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
83eb217e5d7d46c1797dff6e72319188fcfc8fa87f4a2980a5661223e7a1c1e2
BLAKE2b-256 checksum
How to use checksums
45991911e77a72500e7eb4ea549574ac1851484bd99f276efa91bafd7aee588f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/2.7.15

Release files / rawpy-0.13.0-cp34-cp34m-macosx_10_10_x86_64.whl

Download URL rawpy-0.13.0-cp34-cp34m-macosx_10_10_x86_64.whl
Size 532.0 kB
Tags CPython 3.4 CPython 3.4 pymalloc macOS 10.10+ x86-64
SHA-256 checksum
How to use checksums
332211cea46c165314927e6a188e0aa84d03cfad476c0b50931221111e166f85
BLAKE2b-256 checksum
How to use checksums
71bbe58ae7b0d0497187cbcc43dac4afb6c83dbf0fa3ca1bef0654d066317413
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.4.9

Release files / rawpy-0.13.0-cp27-cp27mu-manylinux1_x86_64.whl

Download URL rawpy-0.13.0-cp27-cp27mu-manylinux1_x86_64.whl
Size 645.7 kB
Tags CPython 2.7 CPython 2.7 pymalloc wide-unicode Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
48b0638d8f7f6c98cc571c7e9869e5759a1ac441f989a057c027cf3a0ffd4328
BLAKE2b-256 checksum
How to use checksums
06687d5e739b1e5054a54e6466e1f34b6d5f3988d9e6aa5ba7fc2985b36b92e4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/2.7.15

Release files / rawpy-0.13.0-cp27-cp27m-win_amd64.whl

Download URL rawpy-0.13.0-cp27-cp27m-win_amd64.whl
Size 406.3 kB
Tags CPython 2.7 CPython 2.7 pymalloc Windows x86-64
SHA-256 checksum
How to use checksums
827ee76df80cc5fa9030dbefdc6d58cfbffb92245ab34b3e142255ba47d8a9d4
BLAKE2b-256 checksum
How to use checksums
a1050bd6b2f0c38ef985dcc528d2891adc5373b2d3e62032b607c690f799c3bb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Python-urllib/2.7

Release files / rawpy-0.13.0-cp27-cp27m-win32.whl

Download URL rawpy-0.13.0-cp27-cp27m-win32.whl
Size 363.2 kB
Tags CPython 2.7 CPython 2.7 pymalloc Windows x86-32
SHA-256 checksum
How to use checksums
2fc91d75193f68a0594f185ce5410e652c5b58b9872fa77c870139e50076d2bd
BLAKE2b-256 checksum
How to use checksums
237c92a9f4447c6886e060fbe05162174a3637350ff2d3b4f5bf7939edf02b4e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Python-urllib/2.7

Release files / rawpy-0.13.0-cp27-cp27m-macosx_10_10_x86_64.whl

Download URL rawpy-0.13.0-cp27-cp27m-macosx_10_10_x86_64.whl
Size 532.5 kB
Tags CPython 2.7 CPython 2.7 pymalloc macOS 10.10+ x86-64
SHA-256 checksum
How to use checksums
92b93da8b58f063b820519831253bfb7ac889e3ca1abd227b6e4e5e352a8d54e
BLAKE2b-256 checksum
How to use checksums
aa196990ab3ab667d0430650ea8c925cf0722a0f07532ad7a5d8e8be3ebadab6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/2.7.15

Security for rawpy 0.13.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.13.0 This release

20 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page