Image Generator is a command line tool written in C++ to create bitmap images randomly or by input.
Note: When you view images generated with this program, turn image smoothening off when zooming so you can see the pixels.
Here are some example images that are generated using this program:
Note: some images are screenshots of the actual images because they are so small.
Note: When black & white images are explained, there will be given some extra general info too, because color image explanations just include how they are diferent from the black & white images, so read black & white explanations first.
Here is an image of the terminal after an black & white image is created:
Here is the above image's creation process in steps:
Note: When values are put in the terminal, NO SPACES ARE ALLOWED
-
Selecting if image will be black & white (0) or color image (1). In image creation above, black & white (0) was selected.
-
Inserting image' width and height in pixels. In image creation above, 500 was selected to be the width and height.
-
Deciding if image is generated by manually typed order (what orders mean, is explained later on), or randomly (random option includes randomizing color for eachpixel seperately and generating random order by given order length). In image creation above, order 1010100000000000111111111010101 was used.
-
Entering file's name
Note: Steps above are for black and white images generated by manually typed order and for diferent images, the creation steps are diferent, and for those images that are not explained above will be explained later.
Note: Orders are most important and fun thing is this program because the images can look quite interesting.
In this program (when black & white images are used), orders mean sequences of blacks and whites, for example: black,white,white is an order and if that order is put to a 20x20 image, the image would look like this:
In above image you can see that the pixels (starting from up left) are black,white,white,black,white,white... and so on just like the order was (black,white,white) so the orders are just sequences of blacks and white that will fill the image. Orders are inserted to the program in a way that black = 1 and white = 0 so the above image was created using order 100.
Here is the terminal after the above image was created:
Note: pictures from the terminal in this readme are from the first version of this program so the word choises of the questions might have sligtly changed.
In the first terminal picture example (where the image creation steps were also explained), the image was 500x500 pixels and had the order 1010100000000000111111111010101.
Here is the result:
The image is quite large (500x500 pixels) so you can't see the pixel structure, but if you zoom in you can see it better:
The pixel structure is in most cases quite interesting and if we zoom to the top left of this image, we can see that the pixel order is being followed:
Note: The thing that causes those fun pixel structures in the images is the fact that the order's lenght doesn't go evenly to the images width, whcih means that the order will begin from diferent part of the order when looking ti the left side of the image, as seen in the above image.
Here is an image of the terminal after a color image is created:
Here is the above image's creation process in steps:
-
Selecting if image will be black & white (0) or color image (1). In image creation above, color (1) was selected.
-
Inserting image' width and height in pixels. In image creation above, 30 was selected to be the width and height.
-
Deciding if image is generated by manually typed order (how color orders work is explained later on), or randomly (random option includes randomizing color for eachpixel seperately and generating random order by given order length). In image creation above, order 000255000,000255000,100100100,255000000 was used.
-
Entering file's name
Meaning of the word order in this program is explained in the black & white order section, so here will be explained how color image's orders are diferent from the black & white image's order.
First of all, color image's order is a sequence of colors in rgb values, that are seperated by commas, for example the above terminal picture's color order was 000255000,000255000,100100100,255000000 and if those rgb values are translated to english, the colors are: green,green,grey,red.
Here is the result image:
Note: the one color's rgb values have always three digits in this program, so for example: 255 = 255, 1 = 001, 35 = 035, 20 = 020... and so on.
Here is a picture of the terminal after an image is created randomly using randomization for each pixel seperately:
Here is the above image's creation process in steps:
-
Selecting if image will be black & white (0) or color image (1). In image creation above, black & white (0) was selected.
-
Inserting image' width and height in pixels. In image creation above, 50 was selected to be the width and height.
-
Deciding if image is created by manual typed order or randomly. In image creation above randomly (1) was selected.
-
Deciding if randomization for each pixel seperately (0) or random order (1) is used. In image creation above, random for each pixel (0) was selected.
Note: Random for each pixel images look all very similiar and the random order is much more fun.
It black & white it basically randomly decides for every pixel that will it be black and white.
In color images it decided random color for each pixel.
Here is the generated image from the above terminal picture:
Note: The above image is a screenshot of the actual image (and most of the images you have seen in this readme are also screenshots) because the actual images are so small and because of it beeing a screenshot, you can see a grey pixel in down right corner because it is a bug of my image viewer.
Note: There is a color image of each pixel randomized seperately in the start of this readme.
Here is a picture of a terminal after image is created with a random order:
Here is the above image's creation process in steps:
-
Selecting if image will be black & white (0) or color image (1). In image creation above, black & white (0) was selected.
-
Inserting image' width and height in pixels. In image creation above, 100 was selected to be the width and height.
-
Deciding if image is created by manual typed order or randomly. In image creation above randomly (1) was selected.
-
Deciding if randomization for each pixel (0) seperately is used or random order (1). In image creation above, random order (1) was selected.
-
Entering order's lenght. In image creation above, 15 was used
-
Entering file's name
For black & white, after the length is given, the program creates a random order that is the given length's amount of pixels long.
For color images the process is same, but instead of zeroes and ones, it randomizes color like 100000213.
After the order is generated, the program says the used order, for example in the terminal picture above: "Used order: 111011011101001".
Here is the generated image from above terminal picture (you can see that the used order is used in that image):
Note: This readme has no example of color image generated by a random order but you can generate that yourself.
If that happens, it means that the pixel order will start from the same spot over and over again, resulting bar code style lines.
Here is an example:
Here is the terminal picture:
As you can see, it warns the user about the divisibility and asks if the user wants to continue (0) or not (1). If not continuing (1) is selected, it asks to type the order length again and if it warns when the user manually typed the order, it asks to manually type it again.
Images used in this readme are really small and simple, but with this program you can also create massive images like for example 40000x40000 pixels so the only limit is your image viewer software's capabilities.
Bitmap files tend to take a lot of space and not every image viewer supports bitmap file type but that's not a problem because you can easily convert bitmap files to png files (and other file formats of course)
There are many random pixel image generators out there but none or very few (haven't found any) have the opportunity to create images by color (or black & white) order, which is the greatest and most fun thing in this program.