Correct iteration over pixels in view and fix scaling behaviour.