fransua
December 10, 2018, 10:39am
1
Hello Guys
I was able to process folder one year ago. Since the new version fo gmic, i am in touble : nothing happens with my script (even no error message)
What did I miss ?
Get-ChildItem “C:\Users\fransua\Desktop\FaceStyle” -Filter *.jpg |
Foreach-Object {
fileDestination="modifier1" + .Name
C:\Users\fransua.gimp-2.8\plug-ins\gmic_gimp_qt\gmic_gimp_qt.exe $ .FullName fx_crayongraffiti2_preview 300,50,1,0.4,12,1,2,1,0 -o $fileDestination
Yann
December 10, 2018, 12:58pm
2
Hi,
I would try something like this.
Get-ChildItem "C:\Users\fransua\Desktop\FaceStyle" -Filter *.jpg | Foreach-Object {
$fileDestination = "modifier1" + $_.Name
Start-Process "C:\Users\fransua.gimp-2.8\plug-ins\gmic_gimp_qt\gmic_gimp_qt.exe"`
-WorkingDirectory "C:\Users\fransua.gimp-2.8\plug-ins\gmic_gimp_qt\"`
-ArgumentList $_.FullName, "fx_crayongraffiti2_preview", "300,50,1,0.4,12,1,2,1,0", "-o", $fileDestination
}
Regards,
Yann
fransua
December 10, 2018, 1:31pm
3
Thanks Yann. Seems to work.
Now I have to resolved the next phase :
“libgimp-2.0-0.dll was not found”
Yann
December 10, 2018, 1:44pm
4
You’re welcome.
Have you tried with G’MIC Command-line interface (CLI) ?
I have some errors (dll files missing) with the plugin for Gimp but with the CLI it works fine.
Regards,
Yann
afre
(Alan)
December 11, 2018, 8:07pm
5
Use fx_crayongraffiti2
instead. fx_crayongraffiti2_preview
is for the plugin GUI.
script-fu is a GIMP thing. Basically, it uses a series of GIMP commands, etc.
G’MIC is a separate app and a plug-in in GIMP. Try using the New layer(s) + Verbose (layer name) combination in the G’MIC plug-in window as follows:
[image]
It would name the new output layer with the correct command, provided that the plug-in is also >2.0.0, from which you would copy-paste the command as I have above.
If you would like to apply this command to all of your JPGs, in CLI do
gmic run "input_glob *.jpg fx_crayongraffiti2 300,50,1,0.4,12,1,2,1,0 repeat $! local[$>] output {b}.jpg endlocal done"
Edit : Sorry for the first 3 mins. I made lots of typos.
As you can see, you don’t need to use CMD or PowerShell loops for that.