note 28775 added to function.imagepng

From: Date: Thu, 23 Jan 2003 16:20:37 +0000
Subject: note 28775 added to function.imagepng
Groups: php.notes 
Request: Send a blank email to php-notes+get-42649@lists.php.net to get a copy of this message
"Tip: As with anything that outputs its result directly to the browser, you can use the output-control functions (http://www.php.net/manual/en/ref.outcontrol.php) to capture the output of this function, and save it in a string (for example)." ob_start(); imagepng($image); $image_data = ob_get_contents(); ob_end_clean(); And now you can save $image_data to a database, for example, instead of first writing it to file and then reading the data from it. Just don't forget to use mysql_escape_string... -- http://www.php.net/manual/en/function.imagepng.php http://master.php.net/manage/user-notes.php?action=edit+28775 http://master.php.net/manage/user-notes.php?action=delete+28775 http://master.php.net/manage/user-notes.php?action=reject+28775

« previous php.notes (#42649) next »