fix crashing
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -36,27 +36,34 @@ if __name__ == '__main__':
|
|||||||
go = False
|
go = False
|
||||||
|
|
||||||
if ( args.noscaling ):
|
if ( args.noscaling ):
|
||||||
if ( float( args.sharpening ) > 0 ):
|
if ( args.sharpening != None ):
|
||||||
go = True;
|
if ( float( args.sharpening ) > 0 ):
|
||||||
|
go = True;
|
||||||
|
else:
|
||||||
|
go = False;
|
||||||
else:
|
else:
|
||||||
|
print( 'Missing argument for Sharpening. Please specify that argument and try again!' )
|
||||||
go = False;
|
go = False;
|
||||||
|
|
||||||
if ( go ):
|
if ( args.sharpening != None ):
|
||||||
if ( float( args.sharpening ) > 1 ):
|
if ( float( args.sharpening ) > 1 ):
|
||||||
print( 'Invalid argument for Sharpening, please specify value between 0 and 1!' )
|
print( 'Invalid argument for Sharpening, please specify value between 0 and 1!' )
|
||||||
else:
|
go = False;
|
||||||
if ( args.scalefactor ):
|
|
||||||
if ( args.scalefactor[ len(args.scalefactor) -1: ] == 'x' ):
|
|
||||||
if ( args.threads != None ):
|
if ( go ):
|
||||||
handler.handler( 'bin/lib/FidelityFX_CLI.exe', args.inputfile, 'custom', args.scalefactor, args.outputfile, args.sharpening, args.noscaling, threads=int( args.threads ) );
|
if ( args.scalefactor ):
|
||||||
else:
|
if ( args.scalefactor[ len(args.scalefactor) -1: ] == 'x' ):
|
||||||
handler.handler( 'bin/lib/FidelityFX_CLI.exe', args.inputfile, 'custom', args.scalefactor, args.outputfile, args.sharpening, args.noscaling );
|
if ( args.threads != None ):
|
||||||
else:
|
handler.handler( 'bin/lib/FidelityFX_CLI.exe', args.inputfile, 'custom', args.scalefactor, args.outputfile, args.sharpening, args.noscaling, threads=int( args.threads ) );
|
||||||
raise NameError( 'Argument Scale does require to be of form 2x! (it has to end in x)' )
|
else:
|
||||||
else:
|
handler.handler( 'bin/lib/FidelityFX_CLI.exe', args.inputfile, 'custom', args.scalefactor, args.outputfile, args.sharpening, args.noscaling );
|
||||||
if ( args.threads != None ):
|
else:
|
||||||
handler.handler( 'bin/lib/FidelityFX_CLI.exe', args.inputfile, 'custom', '2x', args.outputfile, args.sharpening, args.noscaling, threads=int( args.threads ) );
|
raise NameError( 'Argument Scale does require to be of form 2x! (it has to end in x)' )
|
||||||
else:
|
else:
|
||||||
handler.handler( 'bin/lib/FidelityFX_CLI.exe', args.inputfile, 'custom', '2x', args.outputfile, args.sharpening, args.noscaling )
|
if ( args.threads != None ):
|
||||||
print( '\n\n---------------------------------------------------------------------------------\n\nDONE \n\nFSRImageVideoUpscalerFrontend V1.1.0\n\nCopyright 2023 FSRImageVideoUpscalerFrontend contributors\nThis application comes with absolutely no warranty to the extent permitted by applicable law\n\n' )
|
handler.handler( 'bin/lib/FidelityFX_CLI.exe', args.inputfile, 'custom', '2x', args.outputfile, args.sharpening, args.noscaling, threads=int( args.threads ) );
|
||||||
|
else:
|
||||||
|
handler.handler( 'bin/lib/FidelityFX_CLI.exe', args.inputfile, 'custom', '2x', args.outputfile, args.sharpening, args.noscaling )
|
||||||
|
print( '\n\n---------------------------------------------------------------------------------\n\nDONE \n\nFSRImageVideoUpscalerFrontend V1.1.0\n\nCopyright 2023 FSRImageVideoUpscalerFrontend contributors\nThis application comes with absolutely no warranty to the extent permitted by applicable law\n\n' )
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user