Increase wait time of temporary file deletion

Increase wait time to 4 seconds from 2 seconds for the deletion of the temporary file made from .show(). The Windows default image viewer at times can take longer than 2 seconds to open and display an image causing the image to never display for the user.
This commit is contained in:
Alex Tedeschi 2022-04-18 16:23:50 -04:00 committed by GitHub
parent a33dc56560
commit 4279c74289
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -141,7 +141,7 @@ class WindowsViewer(Viewer):
def get_command(self, file, **options): def get_command(self, file, **options):
return ( return (
f'start "Pillow" /WAIT "{file}" ' f'start "Pillow" /WAIT "{file}" '
"&& ping -n 2 127.0.0.1 >NUL " "&& ping -n 4 127.0.0.1 >NUL "
f'&& del /f "{file}"' f'&& del /f "{file}"'
) )