Seeding the random generator

I have program that uses random but each time i start the program i get the same sequence. I need to seed and start the rnd-generator but java doesnt support true random. Can anyone tell where i can find such a generator?

True randomness requires a hardware solution that takes input from physical processes (such as radio "white noise"). I think somebody said that certain PCs or chipsets have such hardware, but in general you won't have that option available to you.
java.util.Random and Math.random use a seed you provide, or the system clock if you don't provide a seed. If you use the same seed twice, you'll get the same sequence of numbers both times.
One common error when generating random numbers is to reseed the generator each time in a loop. For instance for (int ix  0; ix  < 100; ix++) {
    Random rand = new Random();
    int i = rand.nextInt(10);
} This will probably produce the same number 100 times, or maybe one number N times and another number 100 - N times. The reason is that every time you create a new Random that way, you're seeding it with the system clock and starting from that sequence's first number. The system clock doesn't have time to change, or maybe changes once, during the time it takes to run through one loop iteration, so you keep starting the same sequence over, or maybe get the first number of two different sequences. The solution is to move the new Random() outside the loop. If it were a member variable, you'd probably want to make it static.
The above doesn't sound like your problem, but I present it because the solution to the problem you are having could lead to the above situation.
As someone already said, if the problem is that you get the same sequence on multiple runs of the program, then just use the system time to seed the PRNG, either explicitly or by not specifying a seed. As long as it takes at least 10 ms between one program startup and the next, you'll get different sequences.
Finally, you might want to look into [url http://java.sun.com/j2se/1.4.2/docs/api/java/security/SecureRandom.html]SecureRandom. It has better random properties than java.util.Random or Math.random, and I think if your computer does have true random hardware attached, it will use that, or can be told to use it.
&para;

Similar Messages

  • How to use the random generator in java

    hey peeps, this is the class in which i am trying to implement the random generator in;
    public class Matchlist
        private studentdetails sd = new studentdetails();
        /** matchList StringBuilder stores the match list in progress */
        private StringBuilder matchList = new StringBuilder();
        private int loop = 0;
        private int matches = 0;
        public Matchlist()
            sd.createstudentdetails();
        /** Method to create the actual match list, returns the list as a string */
        public String CreateMatch()
            int g;
            int y;
                for (g = 0; g < 4; g++)//g = game
                    for (y = 17; y > -1; y--)//y = green house
                        /** Check to see if the game is empty */
                        if (sd.getgh(y).getGame(g).equalsIgnoreCase(""))
                            for (int x = 0; x < 18; x++) //x = yellow house
                                if (sd.getyh(x).getGame(g).equalsIgnoreCase(""))
                                    if (sd.getgh(y).getC_lass() != sd.getyh(x).getC_lass())
                                        /** Check to see if the person has played the other person */
                                        if (sd.getgh(y).checkPlayed(sd.getyh(x).getName()) == false)
                                            /** Set the game to the name of the opponent played */
                                            sd.getyh(x).changeGame(g, sd.getgh(y).getName());
                                            sd.getgh(y).changeGame(g, sd.getyh(x).getName());
                                            /** Build the match list step by step using append with \n at the end to create a new line */
                                            matchList.append(sd.getyh(x).getName() + " vs " + sd.getgh(y).getName() + "\n");
                                            matches++;
                                            break;
                /** Convert the stringbuilder into an actual string, then return it */
                String completeMatchList = matchList.toString();
                System.out.println(matches);
                for (int i = 0; i <18; i++)
                    sd.getyh(i).getEmptyMatches();
                    sd.getgh(i).getEmptyMatches();
                return completeMatchList;
        }what i dont understand is how to implement it to pick my matches at random using the http://java.sun.com/j2se/1.4.2/docs/api/java/util/Random.html java tutorials from here
    regards

    How to use Random ?
    First you open API then you read it, then you use it.
    You mention you try to use it but i just see a horrible nested for for for if if if loop.
    Restructure code and question and maybe it makes more sense.
    Edited by: pgeuens on 10-mrt-2008 22:58

  • Implementing the random generator

    Hello, i have posrted this question in the forum yesterday, and didnt get a reply, so i am reposting, hope i havent violated any of the forum rules? If i have can a mod tell me, delete it and ill try and find my old post
    The problem i am having is trying to implement thwe random generator in to my code, it hasnt been done correctly as its not printing out a list of matches based on the conditons, can someone tell me what is wrong? thanks
    import java.util.Random;
    public class Matchlist
        private studentdetails sd = new studentdetails();
        /** matchList StringBuilder stores the match list in progress */
        private StringBuilder matchList = new StringBuilder();
        private Random studentPicker = new Random();
        private int loop = 0;
        private int matches = 0;
        public Matchlist()
            sd.createstudentdetails();
        /** Method to create the actual match list, returns the list as a string */
        public String CreateMatch()
            int game;
            int yellowStudent = 0;
            int currentGame = 0;
            int matchAttempt = 0;
            while (matches < 70)
                makeMatches:
                for (game = 0; game < 4; game++)//g = game
                    for (int greenStudent = 0; greenStudent < 17; greenStudent++)
                        while (sd.getgh(greenStudent).getGame(game).equalsIgnoreCase(""))
                            matchAttempt++;
                            if (matchAttempt > 800)
                                sd = new studentdetails();
                                game = 0;
                                matches = 0;
                                break makeMatches;
                            yellowStudent = studentPicker.nextInt(17);
                            if (sd.getyh(yellowStudent).getGame(game).equalsIgnoreCase(""))
                                if (sd.getgh(greenStudent).getC_lass() != sd.getyh(yellowStudent).getC_lass())
                                    /** Check to see if the person has played the other person */
                                    if (sd.getgh(greenStudent).checkPlayed(sd.getyh(yellowStudent).getName()) == false)
                                        /** Set the game to the name of the opponent played */
                                        sd.getyh(yellowStudent).changeGame(game, sd.getgh(greenStudent).getName());
                                        sd.getgh(greenStudent).changeGame(game, sd.getyh(yellowStudent).getName());
                                        /** Build the match list step by step using append with \n at the end to create a new line */
                                        matchList.append(sd.getyh(yellowStudent).getName() + " vs " + sd.getgh(greenStudent).getName() + "\n");
                                        matches++;
                                        currentGame++;
                                        if (currentGame == 18)
                                            currentGame = 0;
                                            break;
            /** Convert the stringbuilder into an actual string, then return it */
            String completeMatchList = matchList.toString();
            System.out.println(matches);
            for (int i = 0; i < 18; i++)
                sd.getyh(i).getEmptyMatches();
                sd.getgh(i).getEmptyMatches();
            return completeMatchList;
        }

    Where is it occuring? What are the values of the variabels at that point? We can't even run your code to find out because it could be in the studentdetails class which you haven't posted. I suggest you use an IDE to set breakpoints and step through it in a debugger which will allow you to examine the state of the program a any given point and identify where the NPE is coming from.
    For Netbeans
    http://www.netbeans.org/kb/55/using-netbeans/debug.html
    For Eclipse
    http://pages.cs.wisc.edu/~cs302/resources/EclipseDebugTutorial/

  • How to produce the digital random generator,which counts 0 and 1 randomly

    hi , i want to generate the digital random generator for my project,which counts the 0 and 1 randomly. can anybody help me in doing this.

    Your question has been phrased in a way to cause confusion to what you actually want to achieve. Are you trying to display the random generator like a bit stream on a graph ie:
    If so then this vi will do that:
    Every time you press the 'Generate' Button it will create a digital array according to the 10 bit random number generated and display on a graph.
    There is a way of doing this using a 'Digital waveform graph', i personally have never used it and after about 5 minutes of just looking into it for you gave up It is something i should spend the time to look into as it presents your digital data nicely, showing the 0's and 1's within the graph.
    If i have misunderstood what you want again i apologise
    Rgs,
    Lucither
    Message Edited by Lucither on 05-10-2010 06:27 AM
    "Everything should be made as simple as possible but no simpler"

  • Period of Java's random generator

    Hi.
    I am trying to find out how long period the java generator has. I havent been able to find this info anywhere, even though I searched paper indexes, google, java.sun etc.
    It looks like the random generator uses 2^48 for modulus. And I read somewhere that the multiplier is 0x5DEECE66DL, but this info is unsure. I don't know the increment factor either. With this info it would be possible to calculate the period, if it is not given.
    I would appreciate any information about this.
    Espen Sigvartsen
    [email protected]

    Have you checked out the source code for Random? It shows some of values you mention. Below is a snp of the source code. You should check it out it may provide some of the anwsers you are looking for...
        static final long serialVersionUID = 3905348978240129619L;
        private final static long multiplier = 0x5DEECE66DL;
        private final static long addend = 0xBL;
        private final static long mask = (1L << 48) - 1;
        synchronized public void setSeed(long seed) {
            this.seed = (seed ^ multiplier) & mask;
          haveNextNextGaussian = false;
        synchronized protected int next(int bits) {
            long nextseed = (seed * multiplier + addend) & mask;
            seed = nextseed;
            return (int)(nextseed >>> (48 - bits));

  • How Random is the Random method ?

    Hi ,
    I have designed this method to read in an array of integers and then to shuffle the integers in the array.
         public int [] shuffle(int [] array){
         Random rand = new Random();
         for (int i = 0 ; i <=1000 ; i ++)
              int x = rand.nextInt(312);
              int y = rand.nextInt(312);
              temp = array[x];
              array[x] = array[y];
              array[y] = temp;
              temp = 0;
         return array;
    I then call the method with 10 arrays. The arrays are 312 integers long and the values range from 1 .. 13 . But fairly often I get identical patterns of numbers . I was wondering if it was because of the Random function repeating itself or something I am doing
    Thank you for your time
    Craig

    Ok , Thanks for that .
    So basically because my program is runnning so quickly the Systems clock has not updated by the time when the second array goes into the method and so the random numbers generated are the same.
    Can anyone suggest a way to solve the problem ? because I can not remove the Random generator from the method.
    Thanks Again Craig

  • Random generator

    Peeps, to the following match list how do i implent the random generator so that each match is picked at random but still checks the following conditions? help is desperatley needed, i tried using the guide
    http://java.sun.com/j2se/1.4.2/docs/api/java/util/Random.html
    but to no avail - im REALLY stuck, thanks
    public class Matchlist
        private studentdetails sd = new studentdetails();
        /** matchList StringBuilder stores the match list in progress */
        private StringBuilder matchList = new StringBuilder();
        private int loop = 0;
        private int matches = 0;
        public Matchlist()
            sd.createstudentdetails();
        /** Method to create the actual match list, returns the list as a string */
        public String CreateMatch()
            int g;
            int y;
                for (g = 0; g < 4; g++)//g = game
                    for (y = 17; y > -1; y--)//y = green house
                        /** Check to see if the game is empty */
                        if (sd.getgh(y).getGame(g).equalsIgnoreCase(""))
                            for (int x = 0; x < 18; x++) //x = yellow house
                                if (sd.getyh(x).getGame(g).equalsIgnoreCase(""))
                                    if (sd.getgh(y).getC_lass() != sd.getyh(x).getC_lass())
                                        /** Check to see if the person has played the other person */
                                        if (sd.getgh(y).checkPlayed(sd.getyh(x).getName()) == false)
                                            /** Set the game to the name of the opponent played */
                                            sd.getyh(x).changeGame(g, sd.getgh(y).getName());
                                            sd.getgh(y).changeGame(g, sd.getyh(x).getName());
                                            /** Build the match list step by step using append with \n at the end to create a new line */
                                            matchList.append(sd.getyh(x).getName() + " vs " + sd.getgh(y).getName() + "\n");
                                            matches++;
                                            break;
                /** Convert the stringbuilder into an actual string, then return it */
                String completeMatchList = matchList.toString();
                System.out.println(matches);
                for (int i = 0; i <18; i++)
                    sd.getyh(i).getEmptyMatches();
                    sd.getgh(i).getEmptyMatches();
                return completeMatchList;
        }

    jermaindefoe wrote:
    lol, ok then, the code above is a match list generator that works on a set of conditions, the conditions dont need to be mentioned at the moment as that part of the code works, what does need to be mentioned though is the fact that in another class there is a student list, 2 lots of groups with 18 students each. what i want is to implement the random generator on my code so that players are picked at random and then the conditons are checked, if a match isnt found then another is picked randomly
    i just dont no how, i really would like some help if poss?Are you allowed to use java.util.Random?

  • Random Generator always using the same seed?

    I'm trying to write a file full of random characters, but when I use the code below I always seem to get the same output. Is there any way to force java to sort out it's own random seed?
    // Creates a blank file full of random data
              try
                 BufferedWriter out = new BufferedWriter(new FileWriter("c:/test.txt"));
                 for (int i = 0; i < 1000; i++)
                      Random r = new Random(i);
                      out.write(String.valueOf(r.nextInt(9)));
                 out.close();
              catch (IOException e)
             }Thanks

    A random created with the same seed will give the same set of random numbers.
    Take out the Random creation from the loop
    try
                 BufferedWriter out = new BufferedWriter(new FileWriter("c:/test.txt"));
                    //Create Random here.
                     Random r = new Random( );//No need for any seed
                 for (int i = 0; i < 1000; i++)
                      out.write(String.valueOf(r.nextInt(9)));
                 out.close();
    catch (IOException e)
    [url http://www.feedfeeds.com/feedtv]Feed Your Feeds

  • How can I alter the random number seeding in Labview?

    Is there a way to force a particular seed or dynamically reseed the random number generator in Labview?

    You could use a flat noise generator with one sample.
    It is able to be seeded.
    Tim
    agolovit wrote:
    > Is there a way to force a particular seed or dynamically reseed the
    > random number generator in Labview?

  • QCPatch 'Random Generator' Broken Seed?

    Hi there all,
    Just putting this out there - perhaps I'm wrong, but want some other QC developers who are more experienced to compare with.
    Quartz Composer Patch "Random Generator" - one of the inbuilt patches available.
    Its purpose is to generate random numbers between a range, and supply the number on its output port.
    To this end, it works fine.
    My problem with this patches behavior occurs when it is nested in a macro patch, and that patch is then duplicated (purpose obvious).
    *The duplicated macro patch appears to also copy the Random Generators' base seed.*
    For example I have the same picture resulting from Random Generators nested inside a macro patch that contains processing for a random choice of image to a sprite.
    The only way i could work around this (and this may help others with the same problem) was to Publish the Input ports all the way up to the root level patch, and supply new instances of a Random Generator for each instance of the duplicated macro patch.
    Then I received fresh random seeds from the generator and different images were selected for output to my nested sprite.
    Awfully inconvenient given that each macro had 4 levels of nesting using objects like render in image, 3D transformation and Lighting - all patches that require nesting, and also reset your ports being passed to a parent, meaning you have to - 're-map' the Published Inputs with every layer of nesting. Not to mention the fact that the root level of the document is cluttered all to **** with millions of Random Generator patches.
    Anyone get this behavior?
    Please let me know if I'm just screwing my design up, or if this is encountered by you too and we should report it as a bug. (Ive only been devving QC for several weeks straight, so I'm want to actually report it as a bug yet).
    Many thanks in advance,
    Wilks.

    A random created with the same seed will give the same set of random numbers.
    Take out the Random creation from the loop
    try
                 BufferedWriter out = new BufferedWriter(new FileWriter("c:/test.txt"));
                    //Create Random here.
                     Random r = new Random( );//No need for any seed
                 for (int i = 0; i < 1000; i++)
                      out.write(String.valueOf(r.nextInt(9)));
                 out.close();
    catch (IOException e)
    [url http://www.feedfeeds.com/feedtv]Feed Your Feeds

  • Ideas on generating seeds for random number generators?

    Does anyone here have any ideas or know of any good links to articles that discuss how to generate good seeds for random number generators?
    I am aware that I could always probably call SecureRandom.generateSeed as one technique.
    The major problem that I have with the above is that I have no idea how any given implementation of SecureRandom works, and whether or not it is any good. (For instance, Sun seems to hide their implementation outside of the normal JDK source tree; must be in one of their semi-proprietary sun packages...)
    I thought about the problem a little, and I -think- that the implementation below ought to be OK. The javadocs describe the requirements that I am looking for as well as the implementation. The only issue that still bugs me is that maybe the hash function that I use is not 1-1, and so may not guarantee uniqueness, so I would especially like feedback on that.
    Here's the code fragments:
         * A seed value generating function for Random should satisfy these goals:
         * <ol>
         *  <li>be unique per each call of this method</li>
         *  <li>be different each time the JVM is run</li>
         *  <li>be uniformly spread around the range of all possible long values</li>
         * </ol>
         * This method <i>attempts</i> to satisfy all of these goals:
         * <ol>
         *  <li>
         *          an internal serial id field is incremented upon each call, so each call is guaranteed a different value;
         *          this field determines the high order bits of the result
         *  </li>
         *  <li>
         *          each call uses the result of {@link System#nanoTime System.nanoTime}
         *          to determine the low order bits of the result,
         *          which should be different each time the JVM is run (assuming that the system time is different)
         *  </li>
         *  <li>a hash algorithm is applied to the above numbers before putting them into the high and low order parts of the result</li>
         * </ol>
         * <b>Warning:</b> the uniqueness goals cannot be guaranteed because the hash algorithm, while it is of high quality,
         * is not guaranteed to be a 1-1 function (i.e. 2 different input ints might get mapped to the same output int).
         public static long makeSeed() {
              long bitsHigh = ((long) HashUtil.enhance( ++serialNumber )) << 32;
              long bitsLow = HashUtil.hash( System.nanoTime() );
              return bitsHigh | bitsLow;
         }and, in a class called HashUtil:     
         * Does various bit level manipulations of h which should thoroughly scramble its bits,
         * which enhances its hash effectiveness, before returning it.
         * This method is needed if h is initially a poor quality hash.
         * A prime example: {@link Integer#hashCode Integer.hashCode} simply returns the int value,
         * which is an extremely bad hash.     
         public static final int enhance(int h) {
    // +++ the code below was taken from java.util.HashMap.hash
    // is this a published known algorithm?  is there a better one?  research...
              h += ~(h << 9);
              h ^=  (h >>> 14);
              h +=  (h << 4);
              h ^=  (h >>> 10);
              return h;
         /** Returns a high quality hash for the long arg l. */
         public static final int hash(long l) {
              return enhance(
                   (int) (l ^ (l >>> 32))     // the algorithm on this line is the same as that used in Long.hashCode
         }

    Correct me if I'm incorrect, but doesn't SecureRandom just access hardware sources entropy? Sources like /dev/random?What do you mean by hardware sources of entropy?
    What you really want is some physical source of noise, like voltage fluctuations across a diode, or Johnson noise, or certain radioactive decay processes; see, for example
         http://www.robertnz.net/true_rng.html
         http://ietfreport.isoc.org/idref/draft-eastlake-randomness2/
         this 2nd paper is terrific; see for example this section: http://ietfreport.isoc.org/idref/draft-eastlake-randomness2/#page-9
    But is /dev/random equivalent to the above? Of course, this totally depends on how it is implemented; the 2nd paper cited above gives some more discussion:
         http://ietfreport.isoc.org/idref/draft-eastlake-randomness2/#page-34
    I am not sure if using inputs like keyboard, mouse, and disk events is quite as secure as, say, using Johnson noise; if my skimming of that paper is correct, he concludes that you need as many different partially random sources as possible, and even then "A hardware based random source is still preferable" (p. 13). But he appears to say that you can still do pretty good with these these sources if you take care and do things like deskew them. For instance, the common linix implementation of /dev/random at least takes those events and does some sophisticated math and hashing to try to further scramble the bits, which is what I am trying to simulate with my hashing in my makeSeed method.
    I don't think Java can actually do any better than the time without using JNI. But I always like to be enlightened; is there a way for the JVM to generate some quality entropy?Well, the JVM probably cannot beat some "true" hardware device like diode noise, but maybe it can be as good as /dev/random: if /dev/random is relying on partially random events like keyboard, mouse, and disk events, maybe there are similar events inside the JVM that it could tap into.
    Obviously, if you have a gui, you can with java tap into the same mouse and keyboard events as /dev/random does.
    Garbage collection events would probably NOT be the best candidate, since they should be somewhat deterministic. (However, note that that paper cited above gives you techniques for taking even very low entropy sources and getting good randomness out of them; you just have to be very careful and know what you are doing.)
    Maybe one source of partial randomness is the thread scheduler. Imagine that have one or more threads sleep, and when they wake up put that precise time of wakeup as an input into an entropy pool similar to the /dev/random pool. Each thread would then be put back to sleep after waking up, where its sleep time would also be a random number drawn from the pool. Here, you are hoping that the precise time of thread wakeup is equivalent in its randomness to keyboard, mouse, and disk events.
    I wish that I had time to pursue this...

  • Generate the random numbers

    How Do I Generate Random Numbers in iWorks
    Excel has the "F9" key to generate random numbers numbers don't
    please see below what i'm trying to do
    I open up a blank Excel worksheet, and type the number "1" into cell A1. Type the number "2" into cell A2. Then type the number "3" into cell A3. Type the number "4" into cell A4, and then type the number "5" into cell A5.
    2
    Type the word "PB" into cell A6.
    3
    Enter the function "=RANDBETWEEN(1,59)" into cell B1.
    4
    Enter an exact copy of this function "=RANDBETWEEN(1,59)" into cells B2, B3, B4, and B5.
    5
    Enter the function "=RANDBETWEEN(1,39)" into cell B6.
    6
    Hit the "F9" key to generate the random numbers simulating game.
    But in numbers how do i do this?
    Thanks!
    Alex...

    firstly your not asking about generating random numbers, your asking how do you make a workbook recalculate new random numbers. From M$'s website:
    F9
    Calculates all worksheets in all open workbooks
    It does not produce random numbers the equations should produce random numbers as soon as you enter them in. If they dont then you have automatic reclaculations turned off and F9 is forcing a recalc.
    In numbers there is not shortcut to forcing the workbook to recalculate other than enter data into a cell. So if you made a new table and then enter data. For every data point you enter you should see new data apear.
    Was just validating the method for forcing and its not working on my ipad. I will mark this conversation and if i find it i will respond again.
    Jason
    Message was edited by: jaxjason

  • _dynSessConf - How to tweak logic to generate the random number.

    Hi,
    Can someone please let me know how we can tweak the logic when the random session confirmation number is generated and added as _dynSessConf.
    We have a requirement where this random number needs to be a bit longer than the currently generated default value.
    Regards,
    Saurav

    The session confirmation number used for _dynSessConf is already a randomly generated cryptographic number of long type which is hard to guess. Anyways, if you want to further modify it here is one of the approach that I can suggest.
    You can probably start with the component /atg/dynamo/servlet/sessiontracking/SessionIdGenerator in the component browser. In its details you will find it has a uniqueIdGenerator property which points to /atg/dynamo/servlet/sessiontracking/UniqueIdGenerator. Following on further it would eventually lead you to the components /atg/dynamo/service/random/SecureRandom and /atg/dynamo/service/random/SecureRandomConfiguration. Look at the service configurations of these components and see if you can get something which you can change or customize to meet your requirements.

  • Randomly Generated Pixels

    Hi!
    I want to create a script that creates random (or near random) values for every single pixel of a document, similar to the "Add Noise..." filter, but with more control, such as "only b/w", "only grey", "all RGB" and "all RGB with alpha" and maybe even control over the probability distribution. Any idea how this could be tackled? Selecting every single pixel and applying a random color seems like something that would take a script hours...
    Why do I need this?
    I've started creating some filters in Pixel Bender (http://en.wikipedia.org/wiki/Adobe_Pixel_Bender). Since Pixel Bender doesn't really have any random generator (and workarounds are limited) I'm planning on passing on the random numbers through random pixel values. I'm well aware that this can only be used for filters in which Pixel Bender creates images from scratch, but that's the plan.
    Thanks!

    Understanding the details of the Add Noise filter is probably beyond the scope of just a short post.  Here is an approach to start learning what it does.
    - Take a 50% gray level and make it a Smart Object.
    -  Open up the historgram panel (should show a spike right at 50%)
    - Apply noise filter to Smart Object in monochrome building up from small percentages in small increments
    - You will notice that for this option above, you end up with a uniform probability function over the entire tonality spread at 50% applied for uniform distribution.
    There are a variety of ways to manipulate this function, through various blends.
    Please note a couple things
    1) I am using CS5 and though not documented anywhere that I have seen, the Noise Filter does work different than in CS4.  In CS4, if you run the same noise filter twice on two identical objects, my experience is that you get the identical bit for bit result ( a random pattern yet not independent of the next run of the filter).  Manipulating Probability Density Functions (PDFs) per my previous post requires that each run of the Noise Filter starts with a different "seed" so that the result is independent of the previous run.  CS5 does this where succesive runs will create an independent noise result.
    2) PS does not equally randomize R, G, and B.  There are ways to get around this yet wanted to give you a heads up.
    3) There are other ways to generate quick random patterns outside of PS and bring them in (using scripts).   You would need to understand the format of the Photoshop Raw file.  This type of file contains bytes with just the image pixel data.  These types of files are easy to create and then load into PS. From a script (or even faster call a Python script) create this file and then load it into PS as a Photoshop Raw format file and use as an overlay.  There is not question that this is faster than trying to manipulate individual PS pixesl through a script.
    4) Please not the under Color Settings there is an option called Dither.  If this is set, there are  times where PS adds nosie into the image (I leave mine turned off).  If is used in a number of places in PS other than what the documentation implies (more than just when moving between 8 bit color spaces)
    Good luck if you are going after making a plug-in.  I have never invested in that learning curve.  Good luck.

  • Normal random generator

    Hello,
    Can I customize "normal random generator" to have a input for seed unless a parameter data? In both, "block" and "block script" solution a only can use seed like a parameter.
    Thank´s in advance.

    OK.
    OBJECTIVE: Create several dll for models using a Normal Random Generator Block
    ACTION: Change the "PARAMETER SEED" to a "INPUT SEED". This way, I will config the dll without need a new compilation with diferent seed parameter adjusted for each dll.
    Thank´s.

Maybe you are looking for