I have a tar file which has number of folders within it. In each folder there are number of image files. I need to write a python script which will read each image file and perform some action on the image (ex: thresholding etc.,) and save the image file in the directory I specified. This process need to be done without un-tarring the tar file.
t = tarfile.open('example.tar', 'r')
for member in t.getmembers():
f = t.extractfile(member)
While I am trying to print f
, it's returning None
type. What am I doing wrong?