Compare Tif File Made from PDF pages
Did solve the problem.
First I made the Tiff-Files to exclude the spotcolors.
Then I had to convert to JPG and then build the hashes.
The hashes of the PNG from the Tiffs weren't the same.
I have a PDF File with about 500 pages with a lot of duplicates.
Before I made PNG Thumbnails, then I made MD5-hashs to compare everything. That worked fine.
Now I don't use png thumbnails anymore but tif-files because I have to use "tiffsep" to remove some spotcolors.
If I compare the hashes of the tif-files or even the hashes of the png-files I made from the tif-files its completly different, even if it visually is the same.
I tried to remove the datetimefield and the paging-information from the tiff-metadata but it is still the same.
What can I do?
Thats the code how the thumbnails are generated
    inputpdf = PdfFileReader(path)
    count_pages = inputpdf.getNumPages()
    command = "gs -sDEVICE=tiffsep -dNoSeparationFiles -dLastPage="+str(count_pages)+" -sOutputFile="/home..../page_%d.tif"
    subprocess.Popen(command,shell=True,stdin....)