When an image can't be rendered return empty set for phash

This commit is contained in:
Paul Friederichsen 2023-08-11 21:57:58 -05:00
parent cd4053fe57
commit 44ed146c8f
1 changed files with 8 additions and 2 deletions

View File

@ -40,9 +40,15 @@ def GenerateShapePerceptualHashes( path, mime ):
HydrusData.ShowText( 'phash generation: loading image' )
numpy_image = GenerateNumPyImage( path, mime )
try:
numpy_image = GenerateNumPyImage( path, mime )
return GenerateShapePerceptualHashesNumPy( numpy_image )
return GenerateShapePerceptualHashesNumPy( numpy_image )
except:
return set()
def GenerateShapePerceptualHashesNumPy( numpy_image ):