MESSAGE
DATE | 2021-06-09 |
FROM | Kevin Cozens
|
SUBJECT | Re: [Hangout - NYLXS] [Gimp-user] Script-fu in GIMP - and batch
|
On 2021-06-09 11:22 a.m., ludo0565-at-dbmail.com wrote: > (let* ((filename (car filelist)) > (filenamenew (string-append (car filelist) "-new")) ; as well as (filenamenew (string-append filename "-new")) > (image (car (gimp-file-load RUN-NONINTERACTIVE filename filename))) > (drawable (car (gimp-image-get-active-layer image)))) > (plug-in-unsharp-mask RUN-NONINTERACTIVE image drawable radius amount threshold) > (gimp-file-save RUN-NONINTERACTIVE image drawable filenamenew filenamenew) [snip] > calling the programme with this command: > > gimp -i -b '(batch-unsharp-mask "*.JPG" 5.0 0.5 0)' -b '(gimp-quit 0)' > > Unfortunately I did not have the expected success, as I got this result: > > batch command experienced an execution error: Error: Procedure execution of gimp-file-save failed: unknown file type
If the first entry in the list is "somefile.JPG" what you have above will attempt to save out a new version with the name "somefile.JPG-new".
What you need to do is get the root filename "somefile" and append "-new.JPG" to create the new filename of "somefile-new.JPG".
The simplest way to handle the situation is to read the files from one directory and save the modified version to another. The not so easy method is to split the string on the . in the filename in to "simefile" and ".JPG" so you can create a string with the new name for the modified file.
-- Cheers!
Kevin.
http://www.ve3syb.ca/ | "Nerds make the shiny things that https://www.patreon.com/KevinCozens | distract the mouth-breathers, and | that's why we're powerful" Owner of Elecraft K2 #2172 | #include | --Chris Hardwick _______________________________________________ gimp-user-list mailing list List address: gimp-user-list-at-gnome.org List membership: https://mail.gnome.org/mailman/listinfo/gimp-user-list List archives: https://mail.gnome.org/archives/gimp-user-list _______________________________________________ Hangout mailing list Hangout-at-nylxs.com http://lists.mrbrklyn.com/mailman/listinfo/hangout
|
|