Take imagelist file as a parameter.