Efficiently Save PIL or OpenCV Images to HDF5 File for Large Dataset Save (Python) PIL or OpenCV images to HDF5 file to reduce file size for large dataset.