A simple CLI applet written in Go
to create pictorial representations of White Noise.
An output file of type .pgm
in plain text (with valid headers)
is created and that is, in fact, a Portable GrayMap.
You may read more here.
- Zip Download
- Manual download
$ git clone [email protected]:michalspano/white-noise.git && cd white-noise
Manual run requires a local copy of the Golang Binaries (with proper set-up).
Note: all command are executed from the root of the repository.
A compiled binary is available for Linux
and MacOS
systems.
$ .bin/wnoise <...>
Manual execution is also available.
$ go run src/wnoise.go <...>
Windows users may use the .exe
binary that is compiled for Windows
with a shell script.
$ bash .win/.win_64-bit.sh
$ bash .win/.win_32-bit.sh
Note: The .exe
binaries for Windows
will be stored in the bin
folder.
$ ./wnoise <width> <height>
Used to specify a custom output path with a custom name of the output file.
$ ./wnoise <width> <height> -d <output_path> -png
See additional help.
$ ./wnoise <width> <height> -h
Now, you can convert a generated .pgm
file to a .png
file. Just use the -png
prefix at the end. Check Dependencies for correct set-up.
$ ./wnoise <width> <height> ... -png
You can even convert generated sequence of .png
files to a .gif
file with a predefined
shell
command.
$ bash ./gif-parse/parse.sh <gif-stash_path> <output_path.png>
A .json
file containing the default GIF
attributes is available in the gif-parse
folder.
You can change the gif-duration
and gif-loop-count
(0 indicates infinite loop).
Default values:
{
"gif-preferences": {
"duration": 200,
"loop": 0
}
}
Move all .png
files to the Gif-stash folder.
$ bash ./gif-parse/dump_png.sh
Reset contents of the Gif-stash folder.
$ bash ./gif-parse/reset_stash.sh