Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change grabclipboard() to use PNG compression on macOS #7219

Merged
merged 3 commits into from
Jun 18, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Use relevant extension for temporary file
  • Loading branch information
radarhere authored and abey79 committed Jun 17, 2023
commit e52fa8fe386d5503bd3abb64773be208edcc58ca
2 changes: 1 addition & 1 deletion src/PIL/ImageGrab.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ 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 "'
Expand Down
Loading