> I'm writing a script-fu GIMP plugin and I need to be able to write some
> decimal values to a file during the execution of the script. I've seen
> people suggesting that use of fprintf, etc., but can't figure out how to
> this to work. Can someone please provide some guidance?
If you are using GIMP 2.3.14 or later, the following code should
demonstrate how to write to a file:
(define outport (open-output-file "samplefile.txt"))
(display "Hello" outport)
(display "World" outport)
If you are using a stable version (2.2.x) of the GIMP, then you will need
to use SIOD's 'fopen', 'fwrite', and 'fclose' functions.
(define outfile (fopen "samplefile.txt" "w"))
(fwrite "Hello" outfile)
(fwrite "\n" outfile)
(fwrite "World" outfile)
Gimp-user mailing list