Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Old-photo-bakumatu incompatible with 2.10.21
#3
(07-07-2020, 10:02 PM)Ofnuts Wrote:
(07-07-2020, 06:45 PM)Krikor Wrote: Hi,
Win10, Gimp 2.10.21 Sam's Portable, Script old-photo-bakumatu.scm.

I got this script from a link provided by @Nidhogg at http://gimpchat.com/viewtopic.php?f=9&t=...10#p237580, and I really like it, both the results it produces directly and the possibilities it allows to be added manually after its execution.

It has always worked in the previous 2.10 versions I have used of Gimp, but in this current version (2.10.21 Sam's Portable) unfortunately it does not seem to be compatible and has errors and does not run completely.

The error messages are always as shown below, with the exception of the value called for the Plasma plugin (plug-in-plasma), these values always change, even for the same image.


I wish someone could fix this script, make it functional again.

Thanks in advance!

Quite strange...
  1. The code goes: (plug-in-plasma 1 img channel (srand (realtime)) 5.0).
  2. (realtime) returns the current time in seconds since Jan 1, 1970 00:00 UTC, and is a quick way to get a different value each time the code is executed.
  3. (srand (realtime)) "seeds" the pseudo-random number generator with that value. But as far as I can tell the value returned by (srand) is not random, it is the input value...). The real purpose of (srand) is to make the random sequence repeatable (identical seeds yield identical sequences). This is convenient for tests and debug, but you lose the randomness. In this script it is pointless, and in this very script, the two back-to-back calls to (plugin-solid-noise) are in most cases using the same value unless you are on a very, very slow PC.
  4. However since (srand) returns its passed seed value, if it returns a negative number your PC date is set to before Jan 1, 1970, so you are a time traveller....
You can try to fix the script by replacing (srand (realtime)) everywhere by just (random).

PS: out of curiosity, if you start your script-fu console, what are the results of:
  • (srand 125)
  • (realtime)
  • (srand (realtime))

Hi Ofnuts,

Well ... my pc is not that Jurassic, in fact this same script ran well in previous versions of gimp, at least between 2.10.06 and 2.10.18.
The date of my PC's system is ok, possibly that was a rhetorical question.
In my time travels, I never take my pc with me :-)

"You can try to fix the script by replacing (srand (realtime)) everywhere by just (random) "

I will do that, open an editor, and make this replacement.

"PS: out of curiosity, if you start your script-fu console, what are the results of:

(srand 125)
(realtime)
(srand (realtime)) "

Sorry, but how do I boot (start) from the console? I do not know how to do this.  Confused Blush

I changed the three occurrences of: (srand (realtime)) by just (random).

Changed the error, but still doesn't execute the script in an expected way.
   

===========================================================================================
I researched how to open the console ....
and voilà :
   
Reply


Messages In This Thread
RE: Old-photo-bakumatu incompatible with 2.10.21 - by Krikor - 07-07-2020, 11:14 PM

Forum Jump: