diff --git a/CHANGES.rst b/CHANGES.rst index 4af3fa51634..5da3986ba25 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -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] diff --git a/src/PIL/ImageGrab.py b/src/PIL/ImageGrab.py index 39ecdf42096..927033c6073 100644 --- a/src/PIL/ImageGrab.py +++ b/src/PIL/ImageGrab.py @@ -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", ]