mirror of
				https://github.com/python-pillow/Pillow.git
				synced 2025-11-01 00:17:27 +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) | 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 | - Added in_place argument to ImageOps.exif_transpose() #7092 | ||||||
|   [radarhere] |   [radarhere] | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -95,14 +95,14 @@ def grab(bbox=None, include_layered_windows=False, all_screens=False, xdisplay=N | ||||||
| 
 | 
 | ||||||
| def grabclipboard(): | def grabclipboard(): | ||||||
|     if sys.platform == "darwin": |     if sys.platform == "darwin": | ||||||
|         fh, filepath = tempfile.mkstemp(".jpg") |         fh, filepath = tempfile.mkstemp(".png") | ||||||
|         os.close(fh) |         os.close(fh) | ||||||
|         commands = [ |         commands = [ | ||||||
|             'set theFile to (open for access POSIX file "' |             'set theFile to (open for access POSIX file "' | ||||||
|             + filepath |             + filepath | ||||||
|             + '" with write permission)', |             + '" with write permission)', | ||||||
|             "try", |             "try", | ||||||
|             "    write (the clipboard as JPEG picture) to theFile", |             "    write (the clipboard as «class PNGf») to theFile", | ||||||
|             "end try", |             "end try", | ||||||
|             "close access theFile", |             "close access theFile", | ||||||
|         ] |         ] | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user