Skip to content

Commit d85dab8

Browse files
author
Mickaël S
committed
Mac: get rid of the LaunchServices module
1 parent 0aa861f commit d85dab8

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

mss/darwin.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
# pylint: disable=import-error
88

9-
from LaunchServices import kUTTypePNG
109
from Quartz import (
1110
NSURL, CGDisplayBounds, CGDisplayRotation, CGGetActiveDisplayList,
1211
CGImageDestinationAddImage, CGImageDestinationCreateWithURL,
@@ -77,7 +76,7 @@ def to_png(self, data, width, height, output):
7776
''' Use of internal tools, faster and less code to write :) '''
7877

7978
url = NSURL.fileURLWithPath_(output)
80-
dest = CGImageDestinationCreateWithURL(url, kUTTypePNG, 1, None)
79+
dest = CGImageDestinationCreateWithURL(url, 'public.png', 1, None)
8180
if not dest:
8281
err = 'CGImageDestinationCreateWithURL() failed.'
8382
raise ScreenshotError(err)

0 commit comments

Comments
 (0)