avalanche123/Imagine — comment on commit 8c291daae2cf18bd262645050de4c2b393f6636e
File:  line 0
By jmikola:

Any idea what `imagecolorallocatealpha` fails in the first place? I whipped this up to try and stress test the function, but it never returns boolean false:

$img = imagecreatetruecolor(100,100);

foreach (range(0, 100) as $alpha) {
var_dump(imagecolorallocatealpha($img, 200, 200, 200, round(127 * $alpha / 100)));
}

If we're dealing with a true color image, is there even real allocation to be done (versus perhaps a palette-indexed image)? I'd expect the computed alpha value to simply be a numeric RGBa value, which is what I'm seeing.