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

Reply via email to