add GenTestImage and ReadImage