MCPcopy Create free account
hub / github.com/ICE27182/Python-3D-renderer / upper_left_value

Method upper_left_value

png.py:274–282  ·  view source on GitHub ↗

return the value of the pixel on the upper-left to the pixel whose coordinate is given, 0 if doesn't exist

(x, y)

Source from the content-addressed store, hash-verified

272 return 0
273
274 def upper_left_value(x, y) -> int:
275 """
276 return the value of the pixel on the upper-left to the
277 pixel whose coordinate is given, 0 if doesn't exist
278 """
279 if x - left_distance < 0 or y == 0:
280 return 0
281 else:
282 return defiltered_bytes[y - 1][x - left_distance]
283
284 def paeth_decide_which_pixel_to_add(x, y) -> tuple:
285 """

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected