PNG24. The inversion of alpha channel (transparency)
Posted: Thu Jun 19, 2008 3:22 am
I'm new here. I'm sorry beforehand wether this topic is similar some existing.
Now I explain the consern. There is PNG24 file with stuff imagination. The transparency is around it. How can I invert the alpha channel via PHP? As a result, transparent areas would be non-transparent and vice versa. That is, pixel with alpha 127 index should receive index 0, but, for example, with an index of 117 - get 10. How can I do? Thank you.
Roughly speaking it is necessary to obtain such a result:
Now I explain the consern. There is PNG24 file with stuff imagination. The transparency is around it. How can I invert the alpha channel via PHP? As a result, transparent areas would be non-transparent and vice versa. That is, pixel with alpha 127 index should receive index 0, but, for example, with an index of 117 - get 10. How can I do? Thank you.
Roughly speaking it is necessary to obtain such a result:
