Fix comments
This commit is contained in:
parent
56440d1235
commit
75a7d0486c
@ -21,11 +21,12 @@ def capture_screenshot():
|
|||||||
# Apply blur
|
# Apply blur
|
||||||
blurred_screenshot = screenshot.filter(ImageFilter.GaussianBlur(10))
|
blurred_screenshot = screenshot.filter(ImageFilter.GaussianBlur(10))
|
||||||
|
|
||||||
# Randomly turn 10% of the pixels black
|
# resize
|
||||||
width, height = blurred_screenshot.size
|
width, height = blurred_screenshot.size
|
||||||
width, height = width // 5, height // 5
|
width, height = width // 5, height // 5
|
||||||
blurred_screenshot = blurred_screenshot.resize((width, height), Image.NEAREST)
|
blurred_screenshot = blurred_screenshot.resize((width, height), Image.NEAREST)
|
||||||
|
|
||||||
|
# Randomly turn 10% of the pixels grey
|
||||||
pixels = blurred_screenshot.load()
|
pixels = blurred_screenshot.load()
|
||||||
total_pixels = width * height
|
total_pixels = width * height
|
||||||
black_pixels_count = int(total_pixels * 0.1)
|
black_pixels_count = int(total_pixels * 0.1)
|
||||||
|
Loading…
Reference in New Issue
Block a user