gauthiier/RefractiveIndex — Issue #3: alphabetical vs natural sorting in c++
Author: tomschofield
Created: 2012-02-19 20:43:29+00:00
State: open

The files which are saved in sequence like this:

5_0.00_0.jpg
6_0.00_0.jpg
7_0.00_0.jpg
.
.
.
47_216.66_0.jpg
48_215.71_0.jpg
49_214.96_0.jpg
50_214.01_0.jpg
51_213.26_0.jpg

load like this:

6_0.00_0.jpg
7_0.00_0.jpg
.
.
.
47_216.66_0.jpg
48_215.71_0.jpg
49_214.96_0.jpg
5_0.00_0.jpg
50_214.01_0.jpg
51_213.26_0.jpg

which means that the files are displaying in unexpected order - eg in colour_multi there are flashes of red throughout since these are the first files in the folder.

the problems is better described here http://www.codinghorror.com/blog/2007/12/sorting-for-humans-natural-sort-order.html