Can you allocate a color in PHP GD without an image resource? It should be possible because really an allocated color is a number, right?
$im = imagecreatet
It should be possible because really an allocated color is a number, right?
No, it's not. GD may also have to register that color in the palette of the image (think non true color images).
So you need an image resource.