diff --git a/NIST/fingerprint/functions.py b/NIST/fingerprint/functions.py index 048a5c3644b3a5d1502dfcb54cb09a773a02e5f5..c19a0856e580672c6480e243637df4b9842df0de 100644 --- a/NIST/fingerprint/functions.py +++ b/NIST/fingerprint/functions.py @@ -224,6 +224,9 @@ def changeFormatImage( input, outformat, **options ): buff = StringIO( input ) img = Image.open( buff ) + if img.format in [ "TGA" ]: + raise Exception + except: if string_to_hex( input[ 0 : 4 ] ) in [ "FFA0FFA4", "FFA0FFA5", "FFA0FFA6", "FFA0FFA2", "FFA0FFA8" ]: img = RAWToPIL( WSQ().decode( input ), **options )