note 32503 added to function.imagejpeg
| From: | irishcybernerd at rack1 dot php dot net | Date: | Thu, 29 May 2003 15:33:51 +0000 |
| Subject: | note 32503 added to function.imagejpeg | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-49252@lists.php.net to get a copy of this message | ||
Rather than using the temporary file, as described above, you can buffer the output stream. Someone
else showed me this, and it seems to work very nicely.
//Start buffering the output stream
ob_start();
// output the image as a file to the output stream
Imagejpeg($im);
//Read the output buffer
$buffer = ob_get_contents();
//clear the buffer
ob_end_clean();
//use $buffer as you wish...
----
Manual Page -- http://www.php.net/manual/en/function.imagejpeg.php
Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+32503
Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+32503&report=yes
Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+32503&report=yes