MCPcopy Create free account
hub / github.com/cifertech/DisplayKit / reduce_points_evenly

Function reduce_points_evenly

server/tft_gif_core.py:98–105  ·  view source on GitHub ↗
(points: list[tuple[int, int, int]], max_points: int)

Source from the content-addressed store, hash-verified

96
97
98def reduce_points_evenly(points: list[tuple[int, int, int]], max_points: int) -> list[tuple[int, int, int]]:
99 if len(points) <= max_points:
100 return points
101 reduced: list[tuple[int, int, int]] = []
102 step = len(points) / max_points
103 for i in range(max_points):
104 reduced.append(points[int(i * step)])
105 return reduced
106
107
108def fit_frame(frame: Image.Image, settings: ConvertSettings) -> Image.Image:

Callers 1

convert_frameFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected