I have functional code now. I'm not sure what the problem was exactly.
I tried replacing the sample code I had found with slightly different
sample code, and it worked. I pored over the original code many many
times and never saw any mistakes with the imagecreate function, so I
don't know what the deal is. But it works now.