php-general | 2001122
Date: 12/24/01
- Next message: Philip MacIver: "Re: [PHP] Re: $GLOBALS array"
- Previous message: Casey Allen Shobe: "Re: [PHP] If/else conditional statement ..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi!
I have 2 types of images :PNG and Jpeg. They are w/o extension (its name
generated by tempnam and it is exported from DB). How can i show the both
in one script?
I tryed like this, but it doesn't work(i see one type, and error on
another):
$im = ImageCreateFromJpeg($picname);
$text="Some text";
if($im)
{
$nsi= ImageColorAllocate($im,255,190,0);
ImageString($im,3,0,0,$text,$nsi);
Header("Content-type: image/jpeg");
ImageJpeg($im);
ImageDestroy($im);
}
else
{
$im = ImageCreateFromPNG($picname);
$nsi= ImageColorAllocate($im,255,190,0);
ImageString($im,3,0,0,$text,$nsi);
Header("Content-type: image/png");
ImagePng($im);
ImageDestroy($im);
}
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe <email protected> For additional commands, e-mail: php-general-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Philip MacIver: "Re: [PHP] Re: $GLOBALS array"
- Previous message: Casey Allen Shobe: "Re: [PHP] If/else conditional statement ..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

