mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-11-14 05:36:48 +03:00
More python3 fixes.
Changed the way the translate command that is passed to ghostscript is generated. This should now work on both python2.6+ and python3.
This commit is contained in:
parent
3d1cd63afd
commit
8d27167fc7
|
@ -89,7 +89,7 @@ def Ghostscript(tile, size, fp, scale=1):
|
||||||
gs = subprocess.Popen(command, stdin=subprocess.PIPE, stdout=subprocess.PIPE)
|
gs = subprocess.Popen(command, stdin=subprocess.PIPE, stdout=subprocess.PIPE)
|
||||||
# adjust for image origin
|
# adjust for image origin
|
||||||
if bbox[0] != 0 or bbox[1] != 0:
|
if bbox[0] != 0 or bbox[1] != 0:
|
||||||
gs.stdin.write(b"%d %d translate\n" % (-bbox[0], -bbox[1]))
|
gs.stdin.write(("%d %d translate\n" % (-bbox[0], -bbox[1])).encode('ascii'))
|
||||||
fp.seek(offset)
|
fp.seek(offset)
|
||||||
while length > 0:
|
while length > 0:
|
||||||
s = fp.read(8192)
|
s = fp.read(8192)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user