Rob Shea Photography Infrared photography tutorials, tools, and tips

Color Swap with ImageMagick

While exploring ways to simplify the infrared workflow in Lightroom, I considered writing a Lightroom plug-in. This plug-in would replace the round-trip to Photoshop, by performing a red/blue color swap, and then returning the output to Lightroom.

Ultimately, the Enhanced Profile/LUT and Local Hue Adjustment methods provide a better infrared workflow in Lightroom, since they do not create an extra PSD or TIFF file in addition to the original raw file.

For this plugin, I would have leveraged ImageMagick, the command line image editor, to perform the color swap. This could be done via a channel swap, swapping the reds and the blues, or by inverting the layer and blending it with the original.

Input white balanced 590nm infrared image
Input white balanced 590nm infrared image

ImageMagick output with channel swap
ImageMagick output with channel swap

ImageMagick output with invert blend
ImageMagick output with invert blend

Here are the ImageMagick commands to perform these actions.

Channel Swap via ImageMagick

magick convert input.tif -separate -swap 0,2 -combine output.tif

Invert Blend via ImageMagick

magick convert input.tif ( -clone 0 -negate ) -compose Hue -composite output.tif

While I won’t continue working on this as a Lightroom plugin, I wanted to share this progress. If AI ever gets savvy enough to set the white balance on an infrared image, then this could be used to batch processing infrared images.

Free eBook: Getting Started with Your Converted Infrared or Full-Spectrum Camera
Subscribe to My Newsletter
Lightroom Infrared Color Swap Profiles

Affiliate Links
LifePixel Infrared Camera Conversions - USA and Worldwide. I have 3 cameras converted by LifePixel.
Full Spectrum International Camera Conversions - European Union and Worldwide
KEH Camera - Great source for used cameras and lenses where I've purchased many used items.
SmugMug - Used for my portfolio since 2014. Save 15% off any new account with this link.
If you complete a purchase with these links, I will receive an affiliate commission. There is no cost to you. All opinions posted on this site are my own. I appreciate your support!