php - Convert image to string without saving image -


i know there quite lots question on stack overflow don't think question same.

i want convert image resource string without having save image disk.

is there function that, im not aware of , did not got able find in pass hour of searching google.com

you can use of image* functions output image stream , use output buffering capture it:

ob_start(); // example jpeg imagejpeg($resource); $image_string = ob_get_contents(); ob_end_clean(); 

Comments

Popular posts from this blog

php - regexp cyrillic filename not matches -

c# - OpenXML hanging while writing elements -

sql - Select Query has unexpected multiple records (MS Access) -