/* Used to sort an array of struct image_infos by their image indices. */
static int sort_by_index(const void *p1, const void *p2)
{
/* Used to sort an array of struct image_infos by their image indices. */
static int sort_by_index(const void *p1, const void *p2)
{