Workaround for Nik Plugins on PSP X6

Corel Paint Shop Pro

Moderator: Kathy_9

jsj
Posts: 11
Joined: Thu Aug 29, 2013 7:07 pm
operating_system: Windows 7 Home Premium
System_Drive: C
32bit or 64bit: 64 Bit

Workaround for Nik Plugins on PSP X6

Post by jsj »

I've the Nik Collection of plugins and some of them didn't work on PSP X6.

Notably the Nik Color Efex Pro 4 and Nik Silver Efex Pro 2.

But I found a workaround to use them without any problem. I've made two scripts that execute the filters, send them the image being edited inside PSP X6 and, on return, they create a new layer with the result of the filters applied. Original layers left unttouched.

This scripts works with the latest version of the Nik Collection plugins. I've not tested them with previous versions.

In the attached ZIP:

(Version 2 Scripts here: http://forum.corel.com/EN/viewtopic.php ... 92#p275433)
Nik_Plugins_Scripts.zip
Nik Color Efex Pro 4 and Silver Efex Pro 2 scripts
(2.22 KiB) Downloaded 1292 times
there are two files: Nik_ColorEfexPro4.PspScript and Nik_SilverEfexPro2.PspScript.

Just copy them to: C:\Users\<Your_Windows_User>\Documents\Corel PaintShop Pro\16.0\Scripts-Trusted

You must edit both scripts (with Notepad or similar text editor) and check the line that says:

Code: Select all

filtroExe = u'C:\\Program Files\\Google\\Nik Collection\\Color Efex Pro 4\\Color Efex Pro 4.exe'
Or

Code: Select all

filtroExe = u'C:\\Program Files\\Google\\Nik Collection\\Silver Efex Pro 2\\Silver Efex Pro 2.exe'
The path must point to the path where you have the Nik Collection installed. Those ones are the paths by default so it must work out-of-the-box.

On PSP X6 just execute those scripts. Both of them must appear on the "Script" Toolbar (View -> Toolbars -> Script)
PSP X6 Script Toolbar
PSP X6 Script Toolbar
There is only a flaw with these scripts and is when you exit the Nik Efex filter via "Cancel" a layer with a copy of the image being edited is also created. But is a minor flaw that I want to fix in future versions.
Last edited by jsj on Sun Nov 24, 2013 10:28 am, edited 2 times in total.
Samoreen
Posts: 12
Joined: Wed Aug 28, 2013 12:14 pm
operating_system: Windows 7 Ultimate
System_Drive: C
32bit or 64bit: 64 Bit
Location: Samoreau, France
Contact:

Re: Workaround for Nik Plugins on PSP6

Post by Samoreen »

Thanks a lot for sharing this code. The scripts work flawlessly.
Patrick
Nklightart
Posts: 4
Joined: Fri Aug 23, 2013 9:14 am
operating_system: Windows 7 Home Premium
System_Drive: C
32bit or 64bit: 32 Bit

Re: Workaround for Nik Plugins on PSP6

Post by Nklightart »

Wonderful JSJ, it works perfectly for me on 32-bit X6. Thanks a lot.
Now you must also find a workaround for the color shift issue observed in X6 also ;). I believe its better to rely on you (as X6 is publicly released without any fix even after many users pointing out the issue)
jsj
Posts: 11
Joined: Thu Aug 29, 2013 7:07 pm
operating_system: Windows 7 Home Premium
System_Drive: C
32bit or 64bit: 64 Bit

Re: Workaround for Nik Plugins on PSP6

Post by jsj »

I'm happy seeing those scripts are usefull.

Nklightart about color shift issue I hope Corel fix it via a Service Pack because it's a core problem (I think). :roll:
pwt
Posts: 6
Joined: Sat Sep 24, 2011 10:55 am
operating_system: Windows 7 Home Premium
System_Drive: C
32bit or 64bit: 64 Bit

Re: Workaround for Nik Plugins on PSP6

Post by pwt »

jsj

This is excellent! The scripts work well. I was wondering if I could make a couple of changes if you could point me in the right direction.

1 I think it would be better if the script used the tif format for the temporary file to transfer to the plugin to avoid any loss of quality.

2 I would like to use the 64bit version and I can easily change the script to call the 64bit version of Nik. But this is pointless unless I transfer a 16bit tif file.

3 Is there any way to make the script work in X5?

Sorry for the questions but your scripts are a real breakthrough for those of us using the nik plugins.
jsj
Posts: 11
Joined: Thu Aug 29, 2013 7:07 pm
operating_system: Windows 7 Home Premium
System_Drive: C
32bit or 64bit: 64 Bit

Re: Workaround for Nik Plugins on PSP6

Post by jsj »

Ok pwt I will check later when at home. Here I don't have PSP X6 installed.

But 1 is a matter of change some parameters in the command that saves the temporary file. 2 is trivial.

This code is the one that saves the temporary file:

Code: Select all

App.Do( Environment, 'FileSaveCopyAs', {
            'Encoding': {
                'JPG': {
                    'Variant': App.Constants.JpegFormat.Lossless, 
                    'CompressionFactor': 1, 
                    'ChromaSubSampling': App.Constants.ChromaSubSampling.YCC_1x1_1x1_1x1, 
                    'EXIF': True, 
                    'EmbedJPGICC': False
                    }
                }, 
            'FileName': ficheroTmp, 
            'FileFormat': App.Constants.FileFormat.JPG, 
            'FormatDesc': u'JPG JPEG ', 
            'WorkingMode': 0, 
            'GeneralSettings': {
                'ExecutionMode': App.Constants.ExecutionMode.Silent, 
                'AutoActionMode': App.Constants.AutoActionMode.Match, 
                'Version': ((16,0,0),1)
                }, 
            'DefaultProperties': []
            })
You can record a macro that saves your actual image to 16bit TIFF, save it and edit with a text editor to see which parameters exactly the command "FileSaveCopyAs" have.

About 3 I don't know. I only have PSP X4 and X6 but not X5. I guess that if you change the line 'Host Version' with 15.0 instead 16.0 it would work:

Code: Select all

def ScriptProperties():
    return {
        'Author': u'JSJ',
        'Copyright': u'Copyright (c) 2013 Login:',
        'Description': u'Procesa la imagen actual con Color Efex Pro 4 y devuelve el resultado en una nueva capa',
        'Host': u'PaintShop Pro',
        'Host Version': u'16.00'
        }
You can record and save a macro in PSP X5 and edit it to check this.

Anyway I will check myself all of these later.
bobadger
Posts: 2
Joined: Mon Jan 30, 2012 9:40 am
operating_system: Vista Home Premium
System_Drive: D
32bit or 64bit: 64 Bit

Re: Workaround for Nik Plugins on PSP6

Post by bobadger »

Scripts work great on my Win8 machine with both 32 and 64 PSP6...Thanks!!!!!!!!!!!!
jsj
Posts: 11
Joined: Thu Aug 29, 2013 7:07 pm
operating_system: Windows 7 Home Premium
System_Drive: C
32bit or 64bit: 64 Bit

Re: Workaround for Nik Plugins on PSP6

Post by jsj »

Here is a new version of the scripts:
Nik_Plugins_Scripts_v2.zip
Nik Color Efex Pro 4 and Silver Efex Pro 2 scripts (v2.0)
(2.58 KiB) Downloaded 1351 times
On this version I've added two options:

1.- Use the 32 bit or 64 bit version of Nik Color Efex Pro 4 or Nik Silver Efex Por 2 filters. Just uncomment the line that applies to your preferences and comment the other (by default uses 32 bit version for max compatibility):

Code: Select all

    # 32 bits
    filtroExe = u'C:\\Program Files\\Google\\Nik Collection\\Color Efex Pro 4\\Color Efex Pro 4.exe'
    # 64 bits
    #filtroExe = u'C:\\Program Files\\Google\\Nik Collection\\Color Efex Pro 4\\Color Efex Pro 4 (64-Bit)\\Color Efex Pro 4.exe'
2.- Option to save temporary image in JPEG or TIF, just change the following option (TIF with losseless compression by default); thanks @pwt for the indication:

Code: Select all

    formatoFichero = 'TIF'
If you want JPEG instead (faster save and load times but a minor loss of quality then put 'JPEG' instead of 'TIF')
pwt
Posts: 6
Joined: Sat Sep 24, 2011 10:55 am
operating_system: Windows 7 Home Premium
System_Drive: C
32bit or 64bit: 64 Bit

Re: Workaround for Nik Plugins on PSP6

Post by pwt »

Brilliant! This is ideal and works well with the 64bit version. Thank yu so much.

Philip
Khuri
Posts: 34
Joined: Mon Dec 17, 2012 10:12 pm
operating_system: Windows 10
System_Drive: C
32bit or 64bit: 64 Bit
Contact:

Re: Workaround for Nik Plugins on PSP6

Post by Khuri »

Great work, thank you for those scripts. They work perfectly! :)
OldRadioGuy
Posts: 142
Joined: Sun Feb 22, 2009 5:33 pm
operating_system: Windows 7 Home Premium
System_Drive: C
32bit or 64bit: 64 Bit
motherboard: Dell 0YJPT1 A00
processor: Intel Core i7-3770 3.40 GHZ 8 virtual cores
ram: 16 GB
Video Card: AMD Radeon HD 7770
sound_card: Realtec High Definition Audio
Hard_Drive_Capacity: 2 TB
Monitor/Display Make & Model: Samsung 23" HD 1920x1080 px
Location: USA

Re: Workaround for Nik Plugins on PSP6

Post by OldRadioGuy »

Thanks, jsj.

Your scripts are much appreciated!

Bob
Affinity Photo 1.5 | ON1 Photo RAW 2017 | DxO Optics Pro 11 | Aftershot Pro 3 | Olympus PEN-F cameras
steje44
Posts: 31
Joined: Sun Apr 15, 2012 5:56 pm
operating_system: Windows 7 Home Premium
System_Drive: C
32bit or 64bit: 64 Bit
Location: Germany

Re: Workaround for Nik Plugins on PSP6

Post by steje44 »

Perfect ! Works out of the box !
monkey26
Posts: 2
Joined: Tue Oct 08, 2013 11:50 am
operating_system: Windows 7 Ultimate
System_Drive: C
32bit or 64bit: 32 Bit

Re: Workaround for Nik Plugins on PSP6

Post by monkey26 »

thanks for the scripts!
Is it possible to make a script to execute the Knoll Light Factory 3.2 filter?
This filter use to work in x4, but not in x5 and x6! It just doesn't apply any flare on an image!
jsj
Posts: 11
Joined: Thu Aug 29, 2013 7:07 pm
operating_system: Windows 7 Home Premium
System_Drive: C
32bit or 64bit: 64 Bit

Re: Workaround for Nik Plugins on PSP6

Post by jsj »

monkey26 wrote:thanks for the scripts!
Is it possible to make a script to execute the Knoll Light Factory 3.2 filter?
This filter use to work in x4, but not in x5 and x6! It just doesn't apply any flare on an image!
Really can't answer that question because I don't have that plugin.

The short is: if Knoll Light Factory can be executed standalone, passing the image via command line arguments, then yes, it's possible to script.
monkey26
Posts: 2
Joined: Tue Oct 08, 2013 11:50 am
operating_system: Windows 7 Ultimate
System_Drive: C
32bit or 64bit: 32 Bit

Re: Workaround for Nik Plugins on PSP6

Post by monkey26 »

Unfortunatly, Knoll Light Factory isn't a standalone App, It's a photoshop plugin filter. :oops:
Thanks anyway...
Post Reply