Crowley Code! 
 (Take 12)

Introducing curvr 2007/11/08

All inspirational credit, including the name, go to Aaron Straup Cope (filtr).

Curvr is a command-line tool that automates the most common operations I do in photoshop when I take pictures. I'm quite lazy and I hope that having this tool will make me take more pictures. This is the same line of reasoning that led me to an N73 and that is working out quite well.

I could just run Aaron's filtr script, which does a sort of Lomo-y thing, but that's not so much my style*. Instead, curvr perserves a little more reality and has a couple of key benefits. (* My style being slightly high-contrast but otherwise realistic.)

  1. Sets white- and black-points just like you can do in Photoshop's Levels dialog.
  2. Tweaks the color curve to make mid-tones just a touch darker and force more contrast.

The tweak of the color curve has a couple of nice side effects. Since it doesn't touch colors near the white- or black-points, things look pretty realistic. And for some reason, tweaking the mid-tones the way it does has the side effect of reducing haziness pretty effectively. Plus, skies pick up a really nice deep blue color.

My photography professor in college told us to use the red channel of the image to build black & white from color, rather than letting Photoshop convert it to greyscale. This advice carries through to the color mapping functions in curvr -- when replacing colors, the red channel is used as the key into the color map. It works surprisingly well.

Now the how-to-get-it bit. On a Mac you'll need MacPorts and a Terminal. On Linux you'll probably be able to pick a lot of this up from your package manager (update the Makefile accordingly).

$ sudo port install libpng jpeg

Now you can unpack and install GraphicsMagick. The GraphicsMagick source can be obtained at I use version 1.1.10.

./configure && make && sudo make install

Finally, curvr is just a simple make.

curvr 0.1

Comments (5)

  1. but...but...the first third of that picture looks the nicest!

    britta — 2007/11/08 1:12 pm

  2. I personally like the middle one the best. It doesn't go too dark but has gotten a lot of the haziness out. Perhaps I'm crazy.

    Richard Crowley — 2007/11/08 1:44 pm

  3. Yeah, the middle one seems the best of the trio. I'll have to try this out once I install MacPorts.

    Paul Stamatiou — 2007/11/08 9:36 pm

  4. Hey, I'm having a bit of trouble getting this thing installed. It seems to be choking on /usr/local/include/exiv2 during the curvr make.

    I tried installing exiv2 via sudo port install exiv2, but it doesn't seem to have created the /usr/local/include/exiv2 directory.

    Also, I haven't been able to get GraphicsMagick to compile and install, but sudo port install GraphicsMagick seems to put 1.1.7 in place. Do you think that could be the problem?

    Any ideas?

    Thanks! I'm hoping I can get curvr installed, because it makes your pictures look really nice, and I'm partial to low-overhead command-line tweaks that don't require a lot of clicking.

    Isaac Z. Schlueter — 2008/01/07 10:24 am

  5. You probably need to install development ports as well. On Ubuntu many packages have a version with "-dev" appended to the end that install the headers and such. Or just install from source, which is what I think I did for Exiv2 at least. GraphicsMagick 1.1.7 should work but there have been several good fixes since then. 1.1.10 from source isn't that hard either.

    Richard Crowley — 2008/01/07 10:51 am

Richard Crowley?  Kentuckian engineer who cooks and eats in between bicycling and beering.

I blog mostly about programming and databases.  Browse by month or tag.

To blame for...

© 2009 Richard Crowley.  Managed by Bashpress.