[prog] PHP image functions.

Terri Oda terri at zone12.com
Fri Sep 3 13:30:34 EST 2004


Eventually, I'm going to be trying to merge some transparent gifs, but 
right now, I'm just trying to make the image functions work.

I've got two gifs which are loading correctly (I can convert them to 
other formats and display them, at least).  I'm trying to copy one over 
the other using image copy:

$final_img = imagecopy($bottom_img, $top_img, 0, 0, 0, 0, 100, 100);

But when I try to do anything with $final_img, it says that it's not a 
valid image resource.  And sure enough, if I just print it, it prints 
"1" rather than "Resource id #12" or something along those lines.

Anyone have any clue what's going wrong?  The PHP manual doesn't seem 
to tell me the circumstances under which imagecopy would return 
something that isn't an image resource, and I haven't had much luck 
googling so far. :/

  Terri



More information about the Programming mailing list