mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-25 01:16:16 +03:00
Merge pull request #7219 from abey79/grabclipboard-mac-png
This commit is contained in:
commit
934a6c61a0
|
@ -5,6 +5,9 @@ Changelog (Pillow)
|
|||
10.0.0 (unreleased)
|
||||
-------------------
|
||||
|
||||
- Changed grabclipboard() to use PNG instead of JPG compression on macOS #7219
|
||||
[abey79]
|
||||
|
||||
- Added in_place argument to ImageOps.exif_transpose() #7092
|
||||
[radarhere]
|
||||
|
||||
|
|
|
@ -95,14 +95,14 @@ def grab(bbox=None, include_layered_windows=False, all_screens=False, xdisplay=N
|
|||
|
||||
def grabclipboard():
|
||||
if sys.platform == "darwin":
|
||||
fh, filepath = tempfile.mkstemp(".jpg")
|
||||
fh, filepath = tempfile.mkstemp(".png")
|
||||
os.close(fh)
|
||||
commands = [
|
||||
'set theFile to (open for access POSIX file "'
|
||||
+ filepath
|
||||
+ '" with write permission)',
|
||||
"try",
|
||||
" write (the clipboard as JPEG picture) to theFile",
|
||||
" write (the clipboard as «class PNGf») to theFile",
|
||||
"end try",
|
||||
"close access theFile",
|
||||
]
|
||||
|
|
Loading…
Reference in New Issue
Block a user