Wednesday, 15 January 2014

PHP: How can I create a (PNG, JPEG or GIF) image and encode it directly in base 64 without saving it? -



PHP: How can I create a (PNG, JPEG or GIF) image and encode it directly in base 64 without saving it? -

i have script creates image. have create mutual format gif, jpeg or png out of , convert base of operations 64, later on.

when doing this, not want save image on server, nor want browser output. imagepng() seems not right command this.

any ideas?

if else fails, can this:

ob_start(); imagepng($resource); $png = base64_encode(ob_get_clean());

php image image-processing

No comments:

Post a Comment