
Show HN: PhotoREPL: Live-preview raw photo editing CLI - SamWhited
https://github.com/photoshell/photoREPL
======
trop
This is certainly a Matryoshka doll of wrappings:

\- At root there is dcraw [1], which is Dave Coffin's sometimes inscrutable
but massive and high-functioning CLI utility to read virtually any raw file
from virtually any camera.

\- On top of this, we have LibRaw [2] which "librarizes" dcraw so it can play
nice with other C programs. LibRaw is big and complicated (like dcraw) but
incredibly helpful.

\- On top of that, there is rawkit [3] (with which I wasn't formerly familiar,
and looks interesting), which provides a Python cffi interface to LibRaw.

\- And now we have a REPL built on top of rawkit!

Somewhat perversely, I hope someone makes a CLI interface to rawkit, and then
we could call it, er, dcraw?

One caveat here is that dcraw and its prodigies, though amazing, do just the
initial steps in tuning up a RAW file -- the demosaicing and just a few other
niceties such as white balance. If you want to process the image in a
sophisticated way (e.g. curves, local contrast adjustment, shadows/highlights,
sharpening, masks, etc.) you'll need to switch to a different tool, such as
darktable [4] or RawTherapee [5]. Or use ImageMagick, as mentioned by another
commenter.

Note that darktable now can be scripted via lua, which could be another source
of flexibility. And also that darktable ditched LibRaw for RawSpeed [6], which
is more elegant than LibRaw, as it was written from scratch as library to load
RAW files (and do nothing else), rather than, like dcraw, accreted over the
course of many generations of digital cameras.

1\.
[http://www.cybercom.net/~dcoffin/dcraw/](http://www.cybercom.net/~dcoffin/dcraw/)

2\. [http://www.libraw.org/about](http://www.libraw.org/about)

3\. [https://rawkit.readthedocs.org/](https://rawkit.readthedocs.org/)

4\. [http://darktable.org/](http://darktable.org/)

5\. [http://rawtherapee.com/](http://rawtherapee.com/)

6\.
[https://github.com/klauspost/rawspeed/tree/develop](https://github.com/klauspost/rawspeed/tree/develop)

------
mtdewcmu
Good idea. It seems like it should be possible also to do something similar
with ImageMagick.

