Removed for_each_pixel in favour of an iterator-based solution.
Removed pointless allocation.