A chronological documentation test project, nothing serious, really!

09 Jun 2008 Color channel swapping in Photoshop

This is a little HOWTO (or tutorial) about swapping/inverting two color channels. I will swap the red and the blue color channel using Adobe Photoshop CS 3 to create a more “normal” looking picture with a blue sky on my infrared photo taken with my Nikon D80 and a Hoya R72 67mm IR-filter. I will not describe how to take a IR photo and I will assume you have access to such a filter and know how to use it properly.

The result after this HOWTO should look something like this spring image taken some days ago. Not one of my best photos but it will do the job in this post.

  1. Open the IR photo file in Photoshop, presumeably a RAW file. In my case a Nikon NEF-file.
  2. Open the file whith the White Balance set “As shot”.
  3. The photo might look something like this

  4. Go to the menu and choose Image –> Adjustments –> Channel Mixer… Now you can change the Red Output Channel and set the value for Red to 0% and change the Blue value to 100%. On the Blue Output Channel you set the blue Source Channel to 0% and Red to 100%.
  5. Now we will let Photoshop adjust the levels and colors using the menu Image –> Adjustments –> Auto Levels followed by Image –> Adjustments –> Auto Color.
  6. The result image should look something like this

Thats all that is needed to swap or invert two color channels in Photoshop CS3.

This HOWTO has not been tested on on earlier versions of Photoshop but I guess the features I’ve used aren’t new.

Tags: , , , , ,

Posted by

14 Jan 2008 Rename image files according to EXIF date

This rename trick can be run in Windows, Linux and even Mac since the commandline program I’m going to use, exiv2, is available in all three platforms. Rename all image files in current folder to the format YYYYMMDDHHMM_Filename.EXT

This has been tested on my Nikon D80 JPEG and NEF image files.


exiv2 -r'%Y%m%d-%H%M_:basename:' rename $(ls)

Windows (from the command prompt)

exiv2.exe -r %Y%m%d-%H%M_:basename: rename d*

Windows (in a MS-DOS batch file)

exiv2.exe -r %%Y%%m%%d-%%H%%M_:basename: rename d*

You have to add an extra % if you are going to use exiv2 in a Windows batch file, because % in batch files is treated as a variable and not as a switch to exiv2.

These examples require that you have access to the exiv2 program from the current folder.

Now my image files have names like


Change in workflow
Since I rename all my files in the format YYYYMMDD-HHMM_Filename I’ve included it in my image “workflow” (a simple MS-DOS batch file) I wrote about in Rotate images depending on the EXIF orientation post.

This has been tested successfully on the Windows exiv2 version 0.16

The new batch file can be downloaded here.

Tags: , , , , , , , ,

Posted by

22 Nov 2007 Number of shots taken by Nikon D80 camera

The Nikon D80 camera contains a EXIF tag value that counts the number shots taken

Tag (hex) Tag (dec) IFD Key Type Tag description
0x00a7 167 Makernote Exif.Nikon3.ShutterCount Long Number of shots taken by camera

This can be extracted by running the following command

exiv2 -pt picturename.JPG
Exif.Nikon3.ShutterCount                     Long        1  5263

This example shows that there have been 5263 shots taken.

I guess this EXIF tag exists on Nikon D40x, D60 and D70 also, but this is not verified.

More Nikon specific EXIF tags can be found on

Tags: , , , ,

Posted by