Samstag, 11. Mai 2013

Using NikSoftware in GIMP


Recently I bought NikSoftware Filters, like Color Efex, or Silver Efex. Usually I use them from Lightroom4, and that’s okay for me.

Now I don’t own Photoshop, but I have installed Gimp 2.8.4, and from time to time I use various Gimp filters like G’MIC, or National Geographic.

But I was not able to use the NikSoftware Filter from Gimp as NikSoftware is shipped as Standalone-Executables, and as Photoshop-Plugins, but not as Gimp-Plugins.

Now there is a Gimp Plugin called PSPI which stands for Photoshop-Plugin.

I gave it try: I installed PSPI and registered the directory of the NikSoftware 32bit plugins. I even was able to invoke the Color Efex Pro 4, and it opened, but the image shown by Color Efex Pro 4 was corrupted.

So I gave up, and forgot about using NikSoftware Filters from Gimp, as I was quite happy using Lightroom and NikSoftware.

But as another user on Google+ asked about using NikSoftware from Gimp, I thought about it again, and then I found a nice Gimp plugin called ShellOut, which is able to invoke external applications from within Gimp and passing the current layer to these external applications.

Now if you think about it, that’s exactly the way Lightroom invokes the NikSoftware; the terminoloy of Lightroom is less technical but basically it exports the image, and invokes the extenal NikSoftware application, not using the Photoshop plugin.

Thus I’ m now able to use the NikSoftware filters from gimp, directly thanks to the ShellOut Gimp plugin, and some simple configurations.

Now I try to describe step by step the installation and configuration steps:

  1. Download Gimp, I have installed Gimp 2.8.4
  2. Check that Gimp has the python plugin installed, as ShellOut is python plugin
  3. Download the Gimp ShellOut plugin from http://registry.gimp.org/node/24977, I downloaded ShellOut V 0.7.
  4. Put the ShellOut.py file to your plugin directory, for me this is C:\Users\{my-name}\.gimp-2.8\plug-ins
  5. Edit ShellOut.py in some texteditor (eg. notepad.exe) for configuring the NikSoftware Filters by modifying the programlist = [...] section, see snippet below.
  6. Start Gimp, load an image; you shall be able to invoke ShellOut via Filter|ShellOut
  7. Choose the application from the ShellOut dialog
  8. Edit your image using NikSoftware, and after “Save” in NikSoftware you shall see the modified layer in Gimp, reflecting your editing in NikSoftware

As an example here is a snippet of ShellOut.py - which resides in C:\Users\{my-name}\.gimp-2.8\plug-ins - modified for me NikSoftware environment on Windows:

  programlist = [
  ["Color Efex Pro4", "\"C:\\Program Files\\Google\\Nik Collection\\Color Efex Pro 4\\Color Efex Pro 4 (64-Bit)\\Color Efex Pro 4.exe\"", "tif"],
  ["Silver Efex Pro2", "\"C:\\Program Files\\Google\\Nik Collection\\Silver Efex Pro 2\\Silver Efex Pro 2 (64-Bit)\\Silver Efex Pro 2.exe\"", "tif"],
  ["Viveza2", "\"C:\\Program Files\\Google\\Nik Collection\\Viveza 2\\Viveza 2.exe\"", "jpg"],
  ["Dfine2", "\"C:\\Program Files\\Google\\Nik Collection\\Dfine 2\\Dfine2.exe\"", "tif"],
  ["SharpenerPro3", "\"C:\\Program Files\\Google\\Nik Collection\Sharpener Pro 3\\SHP3RPS.exe\"", "tif"],

  ["MS Paint", "\"C:\\WINDOWS\\system32\\mspaint.exe\"", "bmp"],
  #["XNView", "\"C:\\PF\\XnView\\xnview.exe\"", "png"],
  #["MS Paint", "\"..\\..\\..\\..\\WINDOWS\\system32\\mspaint.exe\"", "bmp"],
  #["InPaint", "\"C:\\PF\\Inpaint\\Inpaint.exe\"", "png"],
  #["Deep Paint", "\"C:\\Program Files\\DeepPaint\\deeppaint.exe\"", "jpg"],
  #["Inkscape", "\"C:\\Program Files\\Inkscape\\inkscape.exe\"", "png"],
  #["PaintDOTNet", "\"C:\\Program Files\\Paint.NET\\PaintDotNet.exe\"", "png"],
  #["MyPaint", "\"C:\\Program Files\\MyPaint\\mypaint.exe\"", "png"],
  #["Photo Filter Factory", "\"C:\\Program Files\\Photo Filter Factory\\Photo Filter Factory.exe\"", "png"],
  #["Photo Pos Pro", "\"C:\\Program Files\\Photo Pos Pro\\Photo Pos Pro.exe\"", "png"],
  #["Java Image Editor", "\"C:\\JavaJars\\imageeditor.bat\"", "png"],
  #["Java Mosaic", "\"C:\\JavaJars\\mosaic.bat\"", "png"],
  #["JDraw", "\"C:\\JavaJars\\jdraw.bat\"", "png"],
  #["Vector Magic", "\"C:\\Program Files\\Vector Magic\\vmde.exe\"", "png"],
  #["Photo Clinic", "\"C:\\MAGIX\\Photo_Clinic_45\\PhotoClinic.exe\"", "png"],
  #["Smilla Enlarger", "\"C:\\utils\\SmillaEnlarger\\SmillaEnlarger.exe\"", "png"],
  ["","",""]
  ]

Now your directory names may vary, so take the snippet as a sample.
In the above snippet I have added Color Efex Pro4, Silver Efex Pro2, Viveza2, Dfine2, and SharpenerPro3.

Note that I have not added HDR Efex Pro 2: The reason is simple, the HDR technique merges two or more images together, ShellOut passes only the current layer to the external application. Thus it makes no sense to add HDR Efex Pro 2.
You can always drag 1 or more images directly to a Nik application. So just select 2 or more images, and drag them onto HDR Efex Pro2, and voila...

Now by using the Gimp ShellOut plugin, I have no need for using the PSPI Gimp plugin.

I hope this little description helps you to use the NikSoftware Filter from withing Gimp, too.