Quick background - G'Mic is a research tool and image processing pipeline that has several different options to work with. The most popular is the built-in option with GIMP, followed close-behind by the Photoshop plugin that works with products like Paint Shop Pro and others. The plugin opens a separate program that executes commands on your image and then sends the fully processed image back to PSP. The big problem, however, is that as far as I know it doesn't properly support recording what you did in script form and sending it back to the plugin to get a repeat effect via script recording. And it doesn't properly run in silent mode.
That's where g'mic for batching comes in. This makes use of the g'mic cli version to execute the same effect over multiple images. It has its flaws and weaknesses but once you're set up, you can play with what you want it to do in the g'mic plugin, and copy the commands for use in the "g'mic for batching" script.
Assumptions made in this tutorial: 1) You already have the G'Mic plugin installed. And 2 - you've hopefully used commandline before. Because I am not going to give the best instructions on this.
[Let's get started]
Let's get started, first you need to download G'Mic CLI zip file. And you need to unzip it somewhere you can find easily. I personally put it in my C:\ directory (never a good idea), but you might consider putting it in your user directory. C:\Users\YourUserName\
To download go here - https://gmic.eu/download.html
Look for the section titled "G'MIC for Windows - Other interfaces" and click on the "stable" link underneath "Command-line interface (CLI):". This downloads a zip file with the gmic CLI.
Again unzip it somewhere and give the resulting folder an easy name like "gmic". it keeps things short and easy to type.
Next open up a powershell or commandline window and navigate to the folder where the gmic.exe program is located. If you've never used the commandline it's pretty easy. Just use the "cd" command followed by either the full path or the folder name you want to go to. For example let's say I put the gmic folder in my user folder. I would simply type (without quotation marks) "C:\users\YourUserName\gmic\"
Then you need to run the following command "gmic update" or if you're in powershell ".\gmic.exe update"
This makes sure that gmic has the latest information on all of the commands it can run. We're almost done with initial setup. The last thing to do is download the gmic for batching script and tell it where to find the gmic cli program.
[The script part]
Download the script attached to this post (it's zipped up so you will have to unzip it) and put it into the Scripts-Trusted folder for your version of PSP. Then open it in Notepad and look for this line near the top of the script.
Code: Select all
##################################### gmic = "C:\\Users\\YourUsername\\gmic\\gmic.exe" #####################################
Update the path to point to the same location as your gmic.exe file. Really quick you'll notice that we have to put '\\' between folder names because the '\' symbol has special meaning in Python (the scripting language for PSP). So make sure when entering the location of your gmic cli tool that you're using double slashes instead of single slashes.
Now there is only one last thing to do. Get the gmic command code from the G'Mic plugin so we can duplicate the effect over and over again. Hopefully without fail.
Open PSP and run the g'mic plugin on an iamge. Find an effect you want to use, set the settings the way you like, and then click on the copy command button in the top right-corner. You can see it highlighted here You'll get text copied to your clipboard with the command needed to duplicate the effect you've just made. Here's an example of the bokeh command.
Code: Select all
Code: Select all
# run gmic with command execute_gmic(filename,"YourCommandHere")
Save the script and give it a test run. If all goes well it should run, a commandline box will open showing the progress, and then the result should open as a new layer at the top of your layers palette.
If it works you can now use this script to apply a very specific set of gmic commands to get a specific look quickly and easily. Well...semi quickly. SSD hard drives will probably run faster than it does on my mechanical one. It also doesn't always respect transparency. The Bokeh command above, for example, will ignore transparency resulting in a white background. I need to learn more to see if there is anything I can do about that in a future update.