Re: [Gimp-user] Some questions about script-fu and tinyscheme.

2007-08-23 Thread Pere Pujal i Carabantes

 For now, I've worked around as this, but looks ugly:
 

 (for-each (lambda (z)(write-char z txt-output-file ))(string-list
 text-string)) 

better as this:

(display text-string txt-output-file)




BTW The gimp script-fu console segfaults typing something like
(let* (a 1))
Should I post a bug report?

gimp 2.4.0-rc1

Yours
Pere

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


Re: [Gimp-user] Some questions about script-fu and tinyscheme.

2007-08-22 Thread Pere Pujal i Carabantes

 Well, I have setted 64MB as max undo memory, but why this set is not
 used when grouping undo?

Solved this, that was a misconfiguration on my hand.
I had setted a minumun undo levels of 5 an this take precedence over the
max memory for undo.


Pere



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


[Gimp-user] Some questions about script-fu and tinyscheme.

2007-08-21 Thread Pere Pujal i Carabantes
Hi!


The first is about writing text to a file.
In SIOD doing something like this I can write text to a file: 

(let* (
(txt-output-file-name (string-append base-filename .txt))
(txt-output-file (fopen txt-output-file-name w)))
(fwrite (string-append text-string \n)txt-output-file)
(fclose txt-output-file))



If I try the same in tinyscheme it raises an error.
How can I do the same in tinyscheme?


For now, I've worked around as this, but looks ugly:

(begin 
(define text-filename (string-append base-filename .txt))
(define txt-output-file (open-output-file text-filename))
(for-each (lambda (z)(write-char z txt-output-file ))(string-list
text-string)) 
(newline txt-output-file))



The second question is about the memory used by gimp-image-undo-group
start-end.
If I use this, my script easy eats all the memory. (It creates, moves
and destroys 49 layers per an undetermined number of runs)


I've created a simple script to test and show:
http://fornol.no-ip.org/linux/gimp/group-undo-test.scm
Defaults to create and destroy 20 layers x 5 runs = 100 layers and
group-undo each run.


Create a new blank image (420x300 pixels)
run the script on it script-fu--test--group-undo
If you check group-undo you will get an image about 193MB
If you don't check, the image will use 64.2MB 

Well, I have setted 64MB as max undo memory, but why this set is not
used when grouping undo?


Thanks
Pere

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