$gdimg_hexcolorallocate is not a GD resource in ImageHexColorAllocate()