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
Post a Comment