RE: [PHP] Website dealing with PHP image generation?

From: Date: Sun, 01 Jul 2001 15:48:32 +0000
Subject: RE: [PHP] Website dealing with PHP image generation?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-55740@lists.php.net to get a copy of this message
I have changed it to below but still get this error "Warning: Supplied argument is not a valid Image resource in /home/hyrum/public_html/test.php on line 41" and that is the ImageCopy line: $image = ImageCreate(500, 70); $bg = ImageColorAllocate($image, 255, 255, 255); $blue = ImageColorAllocate($image, 0, 0, 255); $black = ImageColorAllocate($image, 0, 0, 0); $himage= "usr/hyrum/public_html/images/topics/hyrum.gif"; ImageRectangle($image, 0, 0, 500, 70, $white); ImageString($image, 4, 0, 0, $text, $blue); ImageString($image, 3, 0, 20, $title1, $black); ImageString($image, 3, 0, 35, $title2, $black); ImageString($image, 3, 0, 50, $title3, $black); ImageCopy($image, $himage, 400, 5, 1, 60, 60, 60); ImagePNG($image, "signature.png"); ImageDestroy($image); Jeff > -----Original Message----- > From: Jon Yaggie [mailto:dmsales@design-monster.com] > Sent: Wednesday, May 30, 2001 6:31 PM > To: php-general@lists.php.net > Subject: RE: [PHP] Website dealing with PHP image generation? > > > Jeff, > > I am not extremely fimilar with this function. However, I did > notice you are copying your image at a width and height of 1x1. > this is my guess as far as i know by default this pixels. so the > likehood you would see an image copied at 1x1 is rather low. > > but perhaps i am complete wrong . . .let us know. > > I am creating an image on the fly based on newest entries in one my mySQL > tables. In this created image I am trying to add a small one to > it. Now I > am TRYING to use the below code: > > $image = ImageCreate(500, 70); > $bg = ImageColorAllocate($image, 255, 255, 255); > $blue = ImageColorAllocate($image, 0, 0, 255); > $black = ImageColorAllocate($image, 0, 0, 0); > $himage= "usr/hyrum/public_html/images/topics/hyrum.gif"; > ImageRectangle($image, 0, 0, 500, 70, $white); > ImageString($image, 4, 0, 0, $text, $blue); > ImageString($image, 3, 0, 20, $title1, $black); > ImageString($image, 3, 0, 35, $title2, $black); > ImageString($image, 3, 0, 50, $title3, $black); > //ImageCopy($image, $himage, 400, 20, 1, 1, 60, 60) > > Imagepng($image, "signature.png"); > ImageDestroy($image); > > Am I using ImageCopy incorrectly? It doesn't put anything in the > new image. > > >

« previous php.general (#55740) next »