EnumeratePixels and EnumerateRows should implement DoubleEndedIterator
The EnumeratePixels and EnumerateRows iterators should implement DoubleEndedIterator.
This will make it possible to iterate in reverse order (for example right-to-left instead of left-to-right).
The Pixels and Rows iterators already implement DoubleEndedIterator.
Could you provide an example where this would be actually useful? What do you need this functionality for?
I'm creating a custom CAM program for CNC machines. The program loads an image, and then iterates over the pixels of the image to generate the GCode.
But it needs to iterate in a specific order to generate optimal GCode. The default order (left-to-right, top-to-bottom) creates suboptimal GCode, which slows down the CNC machine by ~50%.
With DoubleEndedIterator it can iterate in the perfect order.
I see! Yes, an implementation of DoubleEndedIterator would be nice to have, and shouldn't be difficult. A PR for it would be welcome.