Collects all blocks and writes entire image
I hope, it's final. Just comments and formating are changed
Checking borders of array
Almost done. Simple version w/o narrow blocks