You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

10 lines
189 B
Python

import lib
class Nearest(lib.Interpolator):
def get_pixel(self, pic, x, y, r, qx, qy):
rx = round(x)
ry = round(y)
3 years ago
pix = pic.pixels[ry][rx]
return pix