user
Task

Write a program that creates an image from a Pseudorandom Number Generator (PRNG) algorithm's output.
The image can have the following dimensions:

:   :   1. 250px by 250px : If the algorithm requires the use of prime numbers, use 8-15 bit primes.
        2. 500px by 500px : If the algorithm requires the use of prime numbers, use 8-15 bit primes.
        3. 1000px by 1000px : If the algorithm requires the use of prime numbers, use 8-32 bit primes.
        4. 1500px by 1500px : If the algorithm requires the use of prime numbers, use 16-64 bit primes.

Possible Output

https://www.random.org/analysis/randbitmap-rdo.png

https://ibb.co/ZJPS16j

See also

* Blum Blum Shub [1].
* Blum-Micali Algorithm: [2].
* Linear congruential generator [3].
assistant
MoarVM uses Mersenne Twister as its PRNG but a prime seeder is not mandatory.

```
# 20200818 Raku programming solution

use Image::PNG::Portable;

srand 2⁶³ - 25; # greatest prime smaller than 2⁶³ and the max my system can take

my @data = < 250 500 1000 1500 >;

@data.map: {
   my $o = Image::PNG::Portable.new: :width($_), :height($_);
   for ^$_ X ^$_ -> @pixel { # about 40% slower if split to ($x,$y) or (\x,\y)
      $o.set: @pixel[0], @pixel[1], 256.rand.Int, 256.rand.Int, 256.rand.Int
   }
   $o.write: "image$_.png" or die;
}

```

Output:

```
file image*.png
image1000.png: PNG image data, 1000 x 1000, 8-bit/color RGBA, non-interlaced
image1500.png: PNG image data, 1500 x 1500, 8-bit/color RGBA, non-interlaced
image250.png:  PNG image data, 250 x 250, 8-bit/color RGBA, non-interlaced
image500.png:  PNG image data, 500 x 500, 8-bit/color RGBA, non-interlaced

```

image500.png (sample image, offsite)