image_set_diff util: lay down foundations