Image processing

Pull request to unify forks.
We need to discuss if we want to distinguish between 8 bit and 16 bit - ready functions.
Split is removed.
Commits from alexlib are merged.
Added handle for image borders, that only copies the outer line of pixel.