2 Lightroom Plugins

Infrared Photos In Lightroom

I came across this excellent Gimp infrared tutorial not long ago, and it got me excited to try some infrared photo processing. Being a recent Lightroom addict, I found it annoying that Lightroom does not support color channel mixing, and having to constantly export-edit-import slowed my workflow.

In doing a bit of research on a solution to this, I discovered the magical world of Lightroom plugins! First, I must give a huge thanks to user ST8_ in this Flickr thread about color channel swapping inside Lightroom, where he provides a Lightroom plugin RBSwap that exports a photo to Gimp to swap the red and blue channels.


This was my first experience on the programmer’s side of Lightroom plugins, and sent me on a wild tangent on learning about Lightroom plugin development – reading up on the Lightroom SDK – learning how Lightroom plugins work – and experimenting with my own.

Basically, LR plugins are a collection of Lua scripts that import and use LR SDK libraries, and all have a pretty basic/common structure (for more info read this).

I decided after looking at the examples included with the LR SDK, that ST8_’s RBSwap plugin actually makes a really nice template for exporting photos from Lightroom to another application.

So, as a learning exercise I took ST8_’s Lightroom plugin and re-worked it a bit to use ImageMagick swap the color channels. I leave the the option to choose Gimp or ImageMagick, and do some simple code formatting/cleanup.

Checkout my Lightroom channel swap plugin source on Google Code!
Or Download a zip of RBSwap.lrplugin.


RBSwap Installation  (on a mac)

  1. Download the whole Lightroom infrared folder
  2. Place RBSwap.lrpdevplugin in ~/Library/Application Support/Adobe/Lightroom/Modules/
  3. Install Gimp and/or ImageMagick
  4. Edit RBSwapExportServiceProvider.lua to choose Gimp *or* ImageMagick
  5. ImageMagick (convert) is current default.  If using Gimp, place the red_blue_swap.scm script ~/Library/Application Support/Gimp/scripts/

Note: If you want just use the command line for swapping color channels instead of Lightroom, here is how for Gimp and ImageMagick, respectively:

$ gimp -i -b '(red_blue_swap img.jpg )' -b '(gimp-quit 0)'")

$ convert img.jpg -set colorspace RGB -separate -swap 0,2 -combine img.jpg



After installing the plugin and restarting Lightroom, simply right click any photo, choose Export > RBSwap

Screen Shot 2013-01-22 at 8.26.31 PM

The following is an example infrared image workflow, all done in Lightroom!

Original Image > RBSwap > Toning in LR4


Export to PyrDetail

Taking what I’ve learned above, and using the RBSwap as a nice LR4 plugin template, I created another plugin to export photos into my image manipulation app: pyr_detail. 


Get the files for my PyrDetail LR export plugin [source] on Google Code!
Or Download the  [zip].

Installation is similar to above, and the path to pyr_detail needs to be modified inside the script (see the Readme). Also note, that this plugin is really just for me, as installing and running PyrDetail is shamefully not as easy as I would like (need to have OpenCV installed, etc), but please try it out!



Here is a video of what that the pyrdetail Lightroom plugin looks like in action:



I just discovered how to make simple plugins for Lightroom, and want to continue learning how to make more with better features.


4 thoughts on “2 Lightroom Plugins”

  1. Hello, My company needs to update a product that uses our color card and a script for ACR to create a custom color profile for the user.

    We are looking for a LR developer to work with. Would you be able to help us find someone?

    Henry DeGroot

    DGK Color Tools

Leave a Reply