When an image can't be rendered return empty set for phash
This commit is contained in:
parent
cd4053fe57
commit
44ed146c8f
|
@ -40,9 +40,15 @@ def GenerateShapePerceptualHashes( path, mime ):
|
||||||
HydrusData.ShowText( 'phash generation: loading image' )
|
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 ):
|
def GenerateShapePerceptualHashesNumPy( numpy_image ):
|
||||||
|
|
Loading…
Reference in New Issue