I wish this helpful for you Abstractly Each pixel in your image is a (R, G, B) vector, where each component is in the range [0, 1]. You want a transform, T, that will convert all of the pixels in your image to a new (R', G', B') under the following constraints:
T(c) = C* .* c (where .* denotes element-wise multiplication)
With these it helps If minification is used then border might have to be little bigger. And to avoid gray borders syndrome, transparent border should not be color(0,0,0,0) but color of the edge with alpha channel of 0. So white edge picture would use 255,255,255,0 as border color.
OpenGL Anti aliasing of shapes on texture after it is created