The task here is to generate an interesting image that includes all 24-bit colors! (i.e. it must have a minimum of 16M pixels). You can generate an image via a function of your choosing (according to specified parameters), or you can use some other bitmap as template. However, you must in any case ensure that the output will have a total of 2^24 different RGB colors!
The template application 081fullcolor from the repository grcis serves as the basis of this project. This is a simple application in which it is possible to load an input image, enter a text parameter, and generate an output image. Within the application, the method Generator.Recompute() is responsible for calculating the output image. This method must be re-written, and the relevant location in the source Generator.cs indicated via comment brackets:
// !!!{{ // !!!}}
After generating the image, the application automatically calculates the number of colours in the result image, and outputs information about this in the bottom right corner of the window. In addition to the calculation time, it informs you how many colours you are still missing to reach the full amount of 2^24 colours. If you did everything right, and all the colours are there, it just writes "Ok" instead of a number.
In order to keep the code nice and organised, please modify the initialisation procedure InitParams() if you are using a text parameter to control output appearance. This function is called once during startup of the application, and currently reads the image dimensions from the string.
When handing in this assignment, please send us only the modified source file Generator.cs! We do not accept entire Visual Studio projects!
On the first line of the source file, please place your name in a comment.
You have to send us the file Generator.cs.
In the first line, put your name in a comment
In the procedure InitParams() you can read any parameters you need.
If you use this string parameter param as input, do not forget to define and describe its semantics.
If you are using images to drive the input, and if you have achieved a nice result with a particular input image, you can also send us that image. But please watch the size of the mail attachment, and use some web upload service if it is too large (Dropbox, GoogleDrive, uloz.to),
and just send us the URL instead.
Hand in the assignment until: 15. 11. 2015
Basic: 6 points, plus a potential bonus of 4 points for using an input image to drive the algorithm (it has to work with any input image you load and yield a sensible result), and a further possible bonus of 5 points (innovation, aesthetics, speed, ...).
Visual Studio project: 081fullcolor.
Modify and hand in the source file: Generator.cs
As a comment in the first line, please include your name!
Copyright (C) 2015 J. Pelikán & A. Wilkie, last change: 2019-05-09 17:52:59 +0200 (Thu, 09 May 2019)