def gamma(value, gamma=2.5, offset=0.5):
    assert 0 <= value <= 255
    return int(pow(float(value) / 255.0, gamma) * 255.0 + offset)

10b2dcd7ac612681e127c561e83afc1c296b4bbc
<mask token>

def gamma(value, gamma=2.5, offset=0.5):
    assert 0 <= value <= 255
    return int(pow(float(value) / 255.0, gamma) * 255.0 + offset)
