Imagecolorallocate allocation failed
$ ImageHand = imagecreatefromgif ("images/mb.gif"); $ color = imagecolorallocate ($ imageHand, 0, 0); var_dump ($ color );
However, my imagecolorallocate always fails to be allocated. as a result, all the fonts in the future will be white and cannot be clearly viewed. what can I do to clear them?
Reply to discussion (solution)
What is the error?
Paste your image
You can use imagecreatetruecolor to create an image. if your image is 8bit, this is not acceptable.
What is the error?
Paste your image
That is, an error is not reported. I will manually run the var_dump command to return a false value for this color variable each time.
You can use imagecreatetruecolor to create an image. if your image is 8bit, this is not acceptable.
How can I check the picture? 8bit?
You can use imagecreatetruecolor to create an image. if your image is 8bit, this is not acceptable.
How can I check the picture? 8bit?
The problem is that you cannot assign colors.
Do you want to paste the image?