loop by whole image handled, code not tested yet.