Function positions

Source
pub fn positions(kinds: &[Kind]) -> Vec<(usize, usize)>
Expand description

Where each image sits among the others of its own kind.

Answers, for every image in the order given, (index, of) — its place among the images of that same kind, and how many there are. That pair is what image_name needs, and computing it here rather than in each caller is what keeps a downloaded booklet and an extracted one named alike.