MCPcopy Index your code
hub / github.com/akazdayo/pixelart / decrease

Method decrease

pixelart_backend/filters.py:161–171  ·  view source on GitHub ↗
(self, image: np.ndarray)

Source from the content-addressed store, hash-verified

159 return small
160
161 def decrease(self, image: np.ndarray) -> np.ndarray:
162 dst = image.copy()
163 idx = np.where((0 <= image) & (64 > image))
164 dst[idx] = 32
165 idx = np.where((64 <= image) & (128 > image))
166 dst[idx] = 96
167 idx = np.where((128 <= image) & (192 > image))
168 dst[idx] = 160
169 idx = np.where((192 <= image) & (256 > image))
170 dst[idx] = 224
171 return dst
172
173
174class GridMask:

Calls

no outgoing calls