php - Saving jpg to png increases size -


this question has answer here:

i use following code save format of image png :

$crawl_outfile = 'webss_' . uniqid() . '.png'; imagepng(imagecreatefromstring(file_get_contents($src)),$crawl_outfile); 

and increases size of 290 kb 1.7 mb. cannot understand reason. there way(parameter) smaller image ?

jpeg lossy compression format (some detail in image lost), png not. therefore, png larger in file size.

png efficient @ compressing things, large areas of same color. jpeg better @ compressing photos.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -