mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-14 11:26:27 +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
|
# push data through ghostscript
|
||||||
try:
|
try:
|
||||||
with open(os.devnull, 'w+b') as devnull:
|
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 = Image.open(outfile)
|
||||||
im.load()
|
im.load()
|
||||||
finally:
|
finally:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user