[Gimp-user] Re: Script-Fu - Batch Mode Problem (ATTEMPT #2)

2002-12-26 Thread matt
Doh!

Please Ignore that last attachmentI added the wrong one. I was testing
something else at that point.  This one illustrates what I was trying to do.

--Matt






-- Forwarded message from [EMAIL PROTECTED] --
On Thu, 19 Dec 2002 04:32:07 - (GMT), pcg( Marc)@goof(A.).(Lehmann )com
wrote:
 On Thu, Dec 19, 2002 at 07:35:36PM -, [EMAIL PROTECTED] wrote:
  image resizing from the command line.  I know that many of you out there
 are
  going to point out that ImageMagick will do what I am looking for. I have
  already gone down that path and the image quality of the scaled images is
 not up

 Then you probably have done sth. wrong, as ImageMagick's algorithms are
 way superior (and way slower ;) to the mere cubic interpolation gimp uses.

 Are you sure you tried sth. like:

convert sourcefile -filter mitchell -geometry newgeometry destfile



ok,  I tried thisand I got an image that was not up to par with what can be
done with Adobe's Image ready doing a similiar process.  However, with Gimp, I
can produce an image that is better and smaller than what Image Ready and
ImageMagick can do.The mitchell filter was better than the cubic filter by
far...but they were still pixelated when you started to look at the images
closely.  I personally think the images are good enough for the webhowever,
the client that I am working for is accustom to having an image of a very high
quality.



 also, other filters than the mitchell filter (which is usually best) are
 also worth a try, cubic for example should rather closely match gimp's
 quality.




 Well, I am no scirpt-fu expert, but I get a lot of mail that tells me that
 scirpt-fu simply doesn't work noninteractively, or at leats not correctly,
 or returns too earfly etc.. etc..


Ok, if script-fu is not meant to be run from the command line without
interactionthen why the batch mode option?

from the gimp man pages
 -b, --batch commands
 Execute the set of commands non-interactively. The
 set  of  commands  is  typically  in the form of a
 script that can be  executed  by  one  of  the  Gimp
 scripting extensions.

Based on the documentation I have seen, I should be able to call a script-fu
function and everything should work.  That is not the case.

Attached is a cut down version of the script that I am attempting to call.   I
am calling this script from the command line as follows..

 gimp -b '(script-fu-test-script 1 200 200
/export/home/matt/toprocess/W-49M01_ven.jpg
/export/home/matt/toprocess/W-49M01_ven_n.jpg)'

When this is run...I get back
batch command: executed successfully.

However, there is no outputted image to be found.   If I change the 1 to 0 to
run interactivly, it pops up the prompt for me to enter in the values needed for
the script and runs successfully.  Is there any way of outputting what has been
passed into a script?

Thoughts?  Comments?

Matt Patterson
[EMAIL PROTECTED]













test-script.scm
Description: Binary data
___
Gimp-user mailing list
[EMAIL PROTECTED]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user



[Gimp-user] Re: Script-Fu - Batch Mode Problem

2002-12-19 Thread Carol Spears
hi

lord knows, i don't know the answer to that directly, but it might be
here:
http://adrian.gimp.org/batch/batch.html

carol

On 2002-12-19 at 1935.36 -, [EMAIL PROTECTED] typed this:
 Hello,
 
 I am having an issue with a Script that I have written being called from the
 command line.
 
 Here is what I am trying to do.  I have written a script using Scheme that runs
 great when I have Gimp loaded up (ie not from the command line).  No problems, 
 does everything that I want. The real point of the script is to automate some 
 image resizing from the command line.  I know that many of you out there are
 going to point out that ImageMagick will do what I am looking for. I have
 already gone down that path and the image quality of the scaled images is not up
 to the quality that client wants.  However, I can make a better, smaller image
 using Gimpnow I just need to make it completely automated.
 
 here is the rub.
 
 I have the script streamlined down and everything is set to be
 non-interactive.   So i should just be able to pass in the variables and away we
 go  My thinking is obviously flawed here as it doesn't quite work. 
 
 here is how I am calling the script:
 
 gimp -b '(script-fu-automated-resize 1 200 200
 /export/home/matt/toprocess/Imagein.jpg
 /export/home/matt/toprocess/Imageout.jpg)' '(gimp-quit 0)'
 
 The script takes in a height, width, beginning image and output image.  I pass
 it a 1 before all of that for non-interactive.  The script is designed to open
 the beginning image, resize accordingly, and then save to the output image.  
 
 I get the following response.
 batch command: executed successfully.
 
 One would think that I should be able to check my system and I should see the
 end imagenopenada...nothing.  If I change the option of 1 to 0 to run in
 interactive mode...I get the prompt for the default values of the script.
 Height, Width, Image to processfinal image.  If I enter those in, click the
 ok buttonit runs like a champ.  What am I missing?  I have the
 non-interactive bit set on the file open which I assume is what is causing this
 dialog to pop up.
 
 Any ideas? tips? Pointer? References?  Anyone already have a  thumbnail script
 that works in this way that can shed some light on the subject?
 
 Matt Patterson
 [EMAIL PROTECTED]

 
 
 
 ___
 Gimp-user mailing list
 [EMAIL PROTECTED]
 http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user
___
Gimp-user mailing list
[EMAIL PROTECTED]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user



Re: [Gimp-user] Re: Script-Fu - Batch Mode Problem

2002-12-19 Thread matt
Yeah...I have read that already and have gotten a ton of great tips on how to
make things workbut I am still having the problem after all that is said and
done.  It appears that the script doesn't want to accept the parameters that I
am passing in properly.  

This has been frustrating me for several days now so I am open to any
suggestions.

Matt Patterson
[EMAIL PROTECTED]




On Wed, 18 Dec 2002 20:05:26 - (GMT), Carol Spears [EMAIL PROTECTED] wrote:
 hi
 
 lord knows, i don't know the answer to that directly, but it might be
 here:
 http://adrian.gimp.org/batch/batch.html
 
 carol
 
 On 2002-12-19 at 1935.36 -, [EMAIL PROTECTED] typed this:
  Hello,
 
  I am having an issue with a Script that I have written being called from 
 the
  command line.
 
  Here is what I am trying to do.  I have written a script using Scheme that 
 runs
  great when I have Gimp loaded up (ie not from the command line).  No 
 problems,
  does everything that I want. The real point of the script is to automate 
 some
  image resizing from the command line.  I know that many of you out there 
 are
  going to point out that ImageMagick will do what I am looking for. I have
  already gone down that path and the image quality of the scaled images is 
 not up
  to the quality that client wants.  However, I can make a better, smaller 
 image
  using Gimpnow I just need to make it completely automated.
 
  here is the rub.
 
  I have the script streamlined down and everything is set to be
  non-interactive.   So i should just be able to pass in the variables and 
 away we
  go  My thinking is obviously flawed here as it doesn't quite work.
 
  here is how I am calling the script:
 
  gimp -b '(script-fu-automated-resize 1 200 200
  /export/home/matt/toprocess/Imagein.jpg
  /export/home/matt/toprocess/Imageout.jpg)' '(gimp-quit 0)'
 
  The script takes in a height, width, beginning image and output image.  I 
 pass
  it a 1 before all of that for non-interactive.  The script is designed to 
 open
  the beginning image, resize accordingly, and then save to the output image.
 
  I get the following response.
  batch command: executed successfully.
 
  One would think that I should be able to check my system and I should see 
 the
  end imagenopenada...nothing.  If I change the option of 1 to 0 to 
 run in
  interactive mode...I get the prompt for the default values of the script.
  Height, Width, Image to processfinal image.  If I enter those in, click 
 the
  ok buttonit runs like a champ.  What am I missing?  I have the
  non-interactive bit set on the file open which I assume is what is causing 
 this
  dialog to pop up.
 
  Any ideas? tips? Pointer? References?  Anyone already have a  thumbnail 
 script
  that works in this way that can shed some light on the subject?
 
  Matt Patterson
  [EMAIL PROTECTED]
 
 
 
 
  ___
  Gimp-user mailing list
  [EMAIL PROTECTED]
  http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user
 ___
 Gimp-user mailing list
 [EMAIL PROTECTED]
 http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user
 
 



___
Gimp-user mailing list
[EMAIL PROTECTED]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user