So far everything works as expected.
I end up just putting an image (made of a pair of images) onto a canvas and that works. I can inspect the image before deleting the duplicate. So all is well, almost.
I make use of this code:
import PIL.Image
class PhotoRec:
'Common base class for all Photo Records - name file size location '
recCount = 0
def __init__(self, file_name, file_path, file_size):
self.file_name = file_name
self.file_path = file_path
self.file_size = file_size
self.twin_file = "notset" # for full path of a 'twin' if it exists
self.thumb_img = PIL.Image.new('RGB', (128,128))
self.make_thumb_image()
self.delete_flag=False
PhotoRec.recCount += 1
def displayCount(self):
print ("recCount = ", PhotoRec.recCount)
def displayStuff(self):
print ( "file_name is:", self.file_name )
print ( "file_path is:", self.file_path )
print ( "file_size is:", self.file_size )
print ( PhotoRec.recCount )
def make_thumb_image (self):
q2 =self.file_path + "/" + self.file_name
temp = PIL.Image.open(q2)
size = 128,128
self.thumb_img = temp.resize(size )
Now my next task is to store about 10000 small images for later use. I have read about using pickle so maybe that is what I want. I want to use those 10000 thumbnails week after week so I need to be able to save them onto my hard drive and retrieve them as needed. Would anyone know if this is a sensible way to proceed (using pickle)? Thanks.