[prog] PHP image functions.

Almut Behrens almut-behrens at gmx.net
Fri Sep 3 19:43:58 EST 2004


On Fri, Sep 03, 2004 at 01:30:34PM -0400, Terri Oda wrote:
> 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.

My guess would be that the "1" is nothing more than some status return
value, saying "OK" (or "error", depending on which way round the logic
is defined).  The image is probably modified in place, i.e. I'd expect
$bottom_img to hold the new image after the function was called...
Have you already looked at $bottom_img?

Almut



More information about the Programming mailing list