Fixed value casting; macro for two dimensional array cloning
Use of macros to get and set pixels, performance optimisation

* Think about abolishing the type of the image. The number of channels is
enough.
Unnecessary warnings from the dependencies