Use subprocess with CREATE_NO_WINDOW flag in ImageShow WindowsViewer by radarhere · Pull Request #7791 · python-pillow/Pillow

Resolves #7789

The user has found that calling using ImageShow from within a .pyw file on Windows causes a console to appear, as a result of calling os.system from Viewer.

os.system(self.get_command(path, **options)) # nosec

The user has suggested calling subprocess with the CREATE_NO_WINDOW flag to fix this.
https://stackoverflow.com/questions/58943289 / https://stackoverflow.com/a/7006424/4093019 agree with this solution.

Because subprocess.CREATE_NO_WINDOW only exists on Windows, I've added a dedicated WindowsViewer show_file() method for this.