I wrote:
 > Maybe the flame plug-in is very sensitive to what random number
 > generator is used, and works well only with the random() function
 > available on most Unixes (but not in MS's C library).

Problem solved. Mea culpa. It wasn't that flame would be sensitive to
the random number generator's deeper statistical properties, but it
did require that it returns non-negative values. I had set RAND_FUNC
as g_random_int in GIMP's config.h, without thinking. The random() or
lrand48() functions that normally are used on Unix both return a
non-negative integer. g_random_int(), however, can return any
integer. Having RAND_FUNC returning nagtive values half of the time
probably can cause all kind of strange behaviour in plug-ins that use

When I changed the definition of RAND_FUNC to:

#define RAND_FUNC() g_random_int_range (0, G_MAXINT)

and recompiled the flame plug-in, it behaves just like on Unix.

Recompiled plug-ins that use RAND_FUNC are available in
www.gimp.org/win32/updates-rand-func-plug-ins.zip. Put them in GIMP's
plug-ins directory.


Reply via email to