def on_off(image, w, h, threshold=128):
    """
    Black and white (no greyscale) with a simple threshold.
    If the color is dark enough, the laser is on!
    """
    result = []

    for row in image:
        result_row = []
        for pixel in row:
            # We draw black, so 255 is for dark pixels
            result_row.append(255 if pixel < threshold else 0)
        result.append(result_row)
    return result