Re: [Gimp-user] script-fu - ERROR: bad function

2006-07-12 Thread Narushima Hironori
Wow, I modify code by refer follow code to running script!
Thank you.

(Difficult to learn new language, but script-fu is very useful. thank you.)

[EMAIL PROTECTED] wrote:

 
 I think that what saulgoode pointed out DOES meet your trouble.
 By the error message Gimp told that the value of (print image)
 might not be a function (and never).
 My poor guess is:
 
 ***
 *** 34,40 
 )
   )
   
 ! (if ( 0 count) (
 (print image) ;; print
 (gimp-image-convert-indexed image 0 0 255 FALSE TRUE )
 (print image) ;; not print
 --- 34,40 
 )
   )
   
 ! (if ( 0 count) (begin
 (print image) ;; print
 (gimp-image-convert-indexed image 0 0 255 FALSE TRUE )
 (print image) ;; not print

___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


[Gimp-user] script-fu question

2006-07-12 Thread Sven Görsmann
Hi  there!

I have the following problem: in the past i used some gimp script-fus
that i wrote to run under gimp 1.1.x and 1.2.x. Then script-fu  function
names/calls changed a lil bit and the scripts didn't work anymore. The
script-execution ends in a pop-up-box with errors.  Same thing with
other cool scripts i collected in the past for the older versions of gimp.

Now i want to convert the scripts to work und the actual gimp version(s)
again.

My question: Do you know any manuals or links that could help me in
converting the old scripts to work again, for example a list which shows
the old function on the left an the new on the right.or something
like a how-to ?

Regards,

Sven Goersmann


___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


Re: [Gimp-user] script-fu question

2006-07-12 Thread saulgoode
Kevin Cozens provides a script written in Perl which will convert  
older script-fus to work with the newer API  
(http://www.interlog.com/~kcozens/software/gimp/2.0/script-update.pl).


Even if you do not have Perl on your machine, you should be able to  
use the information in the script to determine the necessary  
modifications.


Quoting Sven Görsmann [EMAIL PROTECTED]:


My question: Do you know any manuals or links that could help me in
converting the old scripts to work again, for example a list which shows
the old function on the left an the new on the right.or something
like a how-to ?


___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


[Gimp-user] Question about scripting

2006-07-12 Thread Kent Tenney

Howdy,

I am interested in implementing a workflow capability
to Gimp based on the following principles;

- the original file is immutable. (any edits of it lose information)

- the destination file is immutable. (assuming that lossy compression
is used, (usually the case))


This implies that that handling digital images should involve
'recipes' or 'routes' which
describe how to create a destination image from a source.

A destination image is associated with data which
defined the source image, and editing parameters
which resulted in this image.

Now, if when 'resize' the destination image,
I create a new destination image from the source, applying
the same color, cropping, and sharpening transforms,
resampling to a different size.

A good start in this direction would be if I could automatically
save curves and levels files when applying these edits. I could
then script associating the color transforms with the image.

Questions:
Is it possible to script this capability?
(automatically saving the curves and levels files, under names
which indicates which image they are associated with)

Could it be scripted with Python-fu?
(I am comfortable with Python, not scheme)

Thanks,
Kent
___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


Re: [Gimp-user] Question about scripting

2006-07-12 Thread saulgoode
I am not following your use of immutable (it seems to contradict the  
statements in parentheses). Perhaps you could clarify that part.


Also, I would caution that in GIMP parlance, the term resize  
generally refers to changing the canvas size of the image (without  
affecting the pixel data in any way). The term scaling is used to  
describe actually changing the size of image contents.  
Miscommunication could arise if this convention is not recognized.


I am not aware of a Procedural DataBase function that permits  
automatic saving of curves or levels. There is support (via some GAP  
plugins) for the loading and application of such files. The files  
themselves are simple affairs and there should be little difficulty in  
writing functions to save them. (Also, the curves and levels can be  
saved from their corresponding Layers-Colors... dialog boxes.)


I am not familiar with Python-fu but all that you described is easily  
handled by Script-fu and there is little reason to doubt that it  
cannot be accomplished with Python. The PDB is language agnostic and I  
think it is fair to say that Script-fu is the least capable of the  
available scripting languages.


Quoting Kent Tenney [EMAIL PROTECTED]:


Is it possible to script this capability?
(automatically saving the curves and levels files, under names
which indicates which image they are associated with)

Could it be scripted with Python-fu?
(I am comfortable with Python, not scheme)


___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


Re: [Gimp-user] Question about scripting

2006-07-12 Thread Carol Spears
On Wed, Jul 12, 2006 at 08:43:35AM -0500, Kent Tenney wrote:
 
 A good start in this direction would be if I could automatically
 save curves and levels files when applying these edits. I could
 then script associating the color transforms with the image.
 
 Questions:
 Is it possible to script this capability?
 (automatically saving the curves and levels files, under names
 which indicates which image they are associated with)
 
levels and curves settings can be saved via the gui.  i always assumed
you could pick those saved values up from a script and use them.  it 
seems like this would only be useful if you were doing a batch conversion 
and were really confident with using the same adjustment to all of the 
images.

carol

___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


Re: [Gimp-user] Question about scripting

2006-07-12 Thread Sven Neumann
Hi,

On Wed, 2006-07-12 at 08:43 -0500, Kent Tenney wrote:

 A good start in this direction would be if I could automatically
 save curves and levels files when applying these edits. I could
 then script associating the color transforms with the image.

Feel free to contribute PDB functions that allow loading and saving of
curves and levels through the PDB. Sounds like a useful addition.


Sven


___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user