def sendImageFor(self, function, image):
    (x, y, w, h) = self.getAreaFor(function)
    if ((w, h) != image.size):
        if self.debug:
            print((((('Rescaling image from ' + str(image.size)) + ' to ') + str((w, h))) + '.'))
        image = image.resize((w, h))
    self.sendImage(x, y, image)
def sendImageFor(self, function, image):
    (x, y, w, h) = self.getAreaFor(function)
    if ((w, h) != image.size):
        if self.debug:
            print((((('Rescaling image from ' + str(image.size)) + ' to ') + str((w, h))) + '.'))
        image = image.resize((w, h))
    self.sendImage(x, y, image)