Creates an image from an image stream : Create and modify images : Graphics Image PHP Source Code


PHP Source Code » Graphics Image » Create and modify images »

 

Creates an image from an image stream


Example - Modify an image from a mySQL BLOB
<?
mysql_connect
("localhost""user""password");
mysql_select_db("mydatabase");

$query "SELECT photo FROM image_table";
$result mysql_query($query);
$data mysql_result($result0"photo");

$im imagecreatefromstring($data);
$red imagecolorallocate($im25500);
imagestring($im52020"FIRED!"$red);
header("Content-type: image/png");
imagepng($im);
?>


HTML code for linking to this page:

Follow Navioo On Twitter

PHP Source Code

 Navioo Graphics Image
» Create and modify images