GIMP Chat http://gimpchat.com/ |
|
Running gimp script on file from win command line doesn't work http://gimpchat.com/viewtopic.php?f=9&t=15529 |
Page 1 of 1 |
Author: | ango [ Fri Apr 28, 2017 8:53 am ] |
Post subject: | Running gimp script on file from win command line doesn't work |
Hello, i need this batch script to pass a jpeg to gimp console and run my script "CleanUpScan" on it. The script also attempts to read the file and save it as .png. The batch: Code: Select all cd %~dp0 CleanUpScan.scm as attachment. Important snippets from the script: Function header and variable declaration: Code: Select all (define (CleanUpScan filename) Saving the image as png: Code: Select all ;save image -> export as png Problem: I suppose there is an issue with reading the file since the gimp process starts up and immediately shuts down. Output on console: Code: Select all (gimp-2.8.exe:8372): LibGimpBase-WARNING **: gimp-2.8.exe: gimp_wire_read(): error Attachment:
|
Author: | paynekj [ Fri Apr 28, 2017 11:29 am ] |
Post subject: | Re: Running gimp script on file from win command line doesn't work |
You can't use single-quotes on Windows command lines. Try this instead: Code: Select all gimp-2.8.exe -i -v -b "(CleanUpScan \"C:\\Users\\C7X43T\\Desktop\\pngmin\\CCI27042017.jpg\")" -b "(gimp-quit 0)" |
Author: | ango [ Sun Apr 30, 2017 10:07 am ] |
Post subject: | Re: Running gimp script on file from win command line doesn't work |
Thanks for your help, this is how i got it to work: Code: Select all cd %~dp0 |
Page 1 of 1 | All times are UTC - 5 hours [ DST ] |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |