Is there a way to execute gimp from windows console using the liquid rescale plugin to resize an image and output that image to a directory?
I have been looking through the tutorials, and I have been trying to understand the scripting. I am hoping that there is just a single command line I can do this with, any ideas?
Thanks
-Jeff
Page 1 of 1
execute liquid rescale+gimp in windows console
#2
Posted 01 February 2009 - 02:59 PM
You may ask also in the Forum here http://liquidrescale.wikidot.com/ Now liquid resize is also a library
#3
Posted 01 February 2009 - 03:16 PM
GIMP can execute Script-fu commands passed to it on the command line using the '-b' switch. Unfortunately, Windows console is rather lame and makes passing complicated scripts in this manner rather difficult.
I would recommend creating a file similar to the following and saving it to your GIMP scripts directory:
This definition will make it easier for you to invoke the liquid rescale plug-in from the command line. As you can see, it basically opens a named file as an image and then runs the filter on that image.
The command to invoke GIMP with file would appear similar to the following (may need to be on a single line in Windows):
gimp -i -f -b "(batch-gimp-lqr \"filename\"
100 100
0 1000
0 1000
0 0 1
TRUE TRUE FALSE FALSE
0 0
0 0
TRUE \"\"
\"\" \"\" )" -b "(gimp-quit 0)"
You may wish to hardcode some reasonable defaults in your script file (similar to how RUN-NONINTERACTIVE was hardcoded) so that you don't need to include so many parameters on your command line.
I would recommend creating a file similar to the following and saving it to your GIMP scripts directory:
(define (batch-gimp-lqr filename
width height
pres-layer pres-coeff
disc-layer disc-coeff
rigidity rigidity-mask-layer delta-x
resize-aux-layers resize-canvas
new-layer seams grad-func res-order
mask-behavior oper-mode
no-disc-on-enlarge pres-layer-name
disc-layer-name rigmask-layer-name
)
(let* (
(image (car (gimp-file-load RUN-NONINTERACTIVE filename filename)))
(drawable (car (gimp-image-get-active-layer image)))
)
(plug-in-lqr RUN-NONINTERACTIVE image drawable
width height
pres-layer pres-coeff
disc-layer disc-coeff
rigidity rigidity-mask-layer delta-x
resize-aux-layers resize-canvas new-layer seams
grad-func res-order
mask-behavior oper-mode
no-disc-on-enlarge pres-layer-name
disc-layer-name rigmask-layer-name
)
)
)This definition will make it easier for you to invoke the liquid rescale plug-in from the command line. As you can see, it basically opens a named file as an image and then runs the filter on that image.
The command to invoke GIMP with file would appear similar to the following (may need to be on a single line in Windows):
gimp -i -f -b "(batch-gimp-lqr \"filename\"
100 100
0 1000
0 1000
0 0 1
TRUE TRUE FALSE FALSE
0 0
0 0
TRUE \"\"
\"\" \"\" )" -b "(gimp-quit 0)"
You may wish to hardcode some reasonable defaults in your script file (similar to how RUN-NONINTERACTIVE was hardcoded) so that you don't need to include so many parameters on your command line.
Everybody makes their own fun. If you don't make it yourself it's not fun, it's entertainment.
#4
Posted 02 February 2009 - 07:34 AM
saulgoode:
Thank you so much for your time.
I am currently playing with the script in the script-fu console, I am getting errors but I am progressing, I will keep you posted =) thanks again!
Thank you so much for your time.
I am currently playing with the script in the script-fu console, I am getting errors but I am progressing, I will keep you posted =) thanks again!
#5
Posted 02 February 2009 - 08:30 AM
Ok, I have been trying different combos in the Script-Fu console for a while now, but I can't seem to get past the error
> (batch-gimp-lqr "c:\\h.jpg" 100 100 0 1000 0 1000 0 0 1 TRUE TRUE FALSE FALSE 0 0 0 0 TRUE "" "" "") (gimp-quit 0)
Error: Procedure execution of plug-in-lqr failed on invalid input arguments
GIMP says opening the image, but fails with that error.
any ideas?
> (batch-gimp-lqr "c:\\h.jpg" 100 100 0 1000 0 1000 0 0 1 TRUE TRUE FALSE FALSE 0 0 0 0 TRUE "" "" "") (gimp-quit 0)
Error: Procedure execution of plug-in-lqr failed on invalid input arguments
GIMP says opening the image, but fails with that error.
any ideas?
#6
Posted 02 February 2009 - 04:09 PM
You might have to contact the plug-in's authors about how to call LQR from a script. The source code seems to indicate that when run non-interactively, the plug-in only expects five parameters, but its PDB registration demands 24 parameters.
Everybody makes their own fun. If you don't make it yourself it's not fun, it's entertainment.
#7
Posted 02 February 2009 - 05:30 PM
usually he answer quickly if you use help forum here http://liquidrescale.wikidot.com/
Share this topic:
Page 1 of 1

Help












