def get_on_pixels(self, image): """Get a list of all turned on pixels in a binary image Returns a list of tuples of (x,y) coordinates of all matching pixels.""" return _imagingmorph.get_on_pixels(image.im.id)
def get_on_pixels(self, image): """Get a list of all turned on pixels in a binary image Returns a list of tuples of (x,y) coordinates of all matching pixels.""" if image.mode != "L": raise Exception("Image must be binary, meaning it must use mode L") return _imagingmorph.get_on_pixels(image.im.id)
def get_on_pixels(self, image): """Get a list of all turned on pixels in a binary image Returns a list of tuples of (x,y) coordinates of all matching pixels.""" if image.mode != 'L': raise Exception('Image must be binary, meaning it must use mode L') return _imagingmorph.get_on_pixels(image.im.id)