php - imagepng, set quality without writing to file, how? -


i want export png memory:

imagepng ($img, ?, 9); 

i want compress, need set filename too. dont want it, how then?

you this:

<?php ob_start(); imagepng($img, null, 9, png_all_filters); $image_data = ob_get_contents(); ob_end_clean(); 

from manual:

filename: path save file to. if not set or null, raw image stream outputted directly.


Comments

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

firemonkey - How do I make a beep sound in Android using Delphi and the API? -