MCPcopy Create free account
hub / github.com/Breakthrough/PySceneDetect / make_icon_16

Function make_icon_16

scripts/generate_assets.py:124–153  ·  view source on GitHub ↗

Create a hand-crafted 16x16 clapperboard icon.

()

Source from the content-addressed store, hash-verified

122
123
124def make_icon_16() -> Image.Image:
125 """Create a hand-crafted 16x16 clapperboard icon."""
126 img = Image.new("RGBA", (16, 16), FG)
127 px = img.load()
128 assert px is not None
129
130 # Clear 1px padding on all sides
131 for i in range(16):
132 px[0, i] = BG
133 px[15, i] = BG
134 px[i, 0] = BG
135 px[i, 15] = BG
136
137 # Arm stripe gaps (rows 2-4): clear pixels not part of a complete stripe.
138 # A stripe x+y=s spans all 3 arm rows only when 5 <= s <= 16.
139 for y in range(2, 5):
140 for x in range(1, 15):
141 if y < 4 and x < 3:
142 continue
143 if y > 2 and x > 12:
144 continue
145 if not ((x + y) % 4 < 2 and 5 <= (x + y) <= 16):
146 px[x, y] = BG
147
148 # Slate interior (rows 8-12, cols 3-12)
149 for y in range(8, 13):
150 for x in range(3, 13):
151 px[x, y] = BG
152
153 return img
154
155
156def find_inkscape() -> str:

Callers 1

render_all_sizesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected