process images in reverse order for proper layer order