mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-11-11 04:07:21 +03:00
Hide the Ghostscript progress dialog on Windows
This commit is contained in:
parent
7b425a96c1
commit
f13c150f00
|
@ -139,7 +139,12 @@ def Ghostscript(tile, size, fp, scale=1):
|
|||
# push data through ghostscript
|
||||
try:
|
||||
with open(os.devnull, 'w+b') as devnull:
|
||||
subprocess.check_call(command, stdin=devnull, stdout=devnull)
|
||||
startupinfo = None
|
||||
if sys.platform.startswith('win'):
|
||||
startupinfo = subprocess.STARTUPINFO()
|
||||
startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW
|
||||
subprocess.check_call(command, stdin=devnull, stdout=devnull,
|
||||
startupinfo=startupinfo)
|
||||
im = Image.open(outfile)
|
||||
im.load()
|
||||
finally:
|
||||
|
|
Loading…
Reference in New Issue
Block a user