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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to