https://github.com/crowsonkb/synthraw
Synthesizes camera raw files
https://github.com/crowsonkb/synthraw
camera-raw photography
Last synced: 9 months ago
JSON representation
Synthesizes camera raw files
- Host: GitHub
- URL: https://github.com/crowsonkb/synthraw
- Owner: crowsonkb
- License: mit
- Created: 2018-09-06T00:13:20.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-09-18T15:06:37.000Z (over 7 years ago)
- Last Synced: 2025-01-28T22:44:25.311Z (11 months ago)
- Topics: camera-raw, photography
- Language: Python
- Size: 13.7 KB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
synthraw
========
Synthesizes camera raw files (`DNG `_ format) using Python. Requires `libtiff `_.
Installation
------------
.. code-block:: bash
pip3 install numpy pillow
python3 setup.py install
Usage
-----
From the command line:
.. code-block:: bash
synthraw in.png out.dng
From Python:
.. code-block:: python
import numpy as np
from synthraw import DNG
# Create a 32x32 pixel array
data = np.zeros((32, 32), dtype=np.uint16)
# Set one pixel to white
data[1, 1] = 65535
dng = DNG('out.dng')
dng.write_data(data)
dng.close()