Skip to content

Commit e6cc1eb

Browse files
author
Mickaël Schoentgen
committed
Doc: several examples fixes
1 parent 9fe7a1f commit e6cc1eb

File tree

4 files changed

+5
-8
lines changed

4 files changed

+5
-8
lines changed

CHANGELOG

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ History:
33
<see Git checkin messages for history>
44

55
dev 2017/xx/xx
6-
- doc: fix PIL example (fix #22)
76
- add the 'Say Thanks' button
7+
- doc: several fixes (fix #22)
88

99
3.0.1 2017/07/06
1010
- fix examples links

docs/source/examples/callback.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,5 @@ def on_exists(fname):
2525

2626

2727
with mss.mss() as sct:
28-
filename = sct.shot(output='mon-%d.png', callback=on_exists))
28+
filename = sct.shot(output='mon-%d.png', callback=on_exists)
2929
print(filename)

docs/source/examples/linux_display_keyword.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@
1010

1111

1212
with MSS(display=':0.0') as sct:
13-
for filename in sct.save(output=output):
13+
for filename in sct.save():
1414
print(filename)

docs/source/examples/pil.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,8 @@
1616
# Get raw pixels from the screen
1717
sct_img = sct.grab(monitor)
1818

19-
# Create the Image, solution 1 (slower)
20-
# img = Image.frombytes('RGB', sct_img.size, sct_img.rgb)
21-
22-
# Create the Image, solution 2
23-
img = Image.frombytes('RGB', sct_img.size, sct_img.rgb, 'raw')
19+
# Create the Image
20+
img = Image.frombytes('RGB', sct_img.size, sct_img.rgb)
2421

2522
# And save it!
2623
output = 'monitor-{0}.png'.format(num)

0 commit comments

Comments
 (0)