All algorithm is implemented, but there are problems with memory, a lot of segmentation fault messages.
Saving to .jpeg file is not implemented yet.