For some reason alpha channel in php gd is limited to 0-127 range, while it's supposed to be 0-255 for rgba.
Now, if we create a color with alpha greater than 127 (eg, using imagecolorallocatealpha) it would make a default black color instead...
I wonder if there is any alternative way to make pictures that would fully utilize the alpha channel. It's beyond my understanding why would gd truncate the alpha channel down to 7bits, and then again output a png with 8 bit/channel.
I would also consider outputting png pixel by pixel.