Here's my mapping code (transA is hard-coded to be 110, and both alpha and transA are integers):
Code:
// This is a little odd, but we want 128 to map to our standard
// transparent alpha (transA), anything below transA to smoothly map
// from 0 to transA, and anything above transA to smoothly map from
// transA to 255.
if (alpha == 128)
{
alpha = transA;
}
else if (alpha < 128)
{
alpha = alpha * transA / 128;
}
else
{
alpha = transA + (alpha - 127) * (255 - transA) / 128;
}