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 -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -