ajoo Posted November 13, 2016 Share Posted November 13, 2016 Hi all, The following bit of snippet displays a resized jpeg. $dst = imageCreateTrueColor($nwidth, $nheight); imageCopyResampled($dst, $src, 0, 0, 0, 0, $nwidth, $nheight, $ix, $iy); imagejpeg($dst); Is there a simple, direct way to extract image data (BLOB) from this without actually saving the imagejpeg($dst) to a file first and then reading it back again ? Thanks all ! Quote Link to comment Share on other sites More sharing options...
Solution mac_gyver Posted November 13, 2016 Solution Share Posted November 13, 2016 you would need to use php's output buffering statements. Quote Link to comment Share on other sites More sharing options...
ajoo Posted November 13, 2016 Author Share Posted November 13, 2016 The following does it :- ob_start(); imagejpeg($dst_img); $imagedata = ob_get_contents(); ob_end_flush(); Thanks for the pointer mac_gyver Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.