[Gimp-user] script-fu "rand" function

Kevin Cozens kevin at ve3syb.ca
Sat Mar 21 19:48:48 PDT 2009


Catherine Jones wrote:
> gimp -i -b '(<script-name> <var 1> <var2> ...)' -b '(gimp-quit 0)'
> 
> always does the same thing (assuming the same variable inputs).

Of course it would. You are starting a fresh copy of GIMP each time. If you 
want to change the seed each time you start GIMP, add '(srand (realtime))' 
before you call '(rand)'.

-- 
Cheers!

Kevin.

http://www.ve3syb.ca/           |"What are we going to do today, Borg?"
Owner of Elecraft K2 #2172      |"Same thing we always do, Pinkutus:
                                 |  Try to assimilate the world!"
#include <disclaimer/favourite> |              -Pinkutus & the Borg


More information about the Gimp-user mailing list