Converting an image to png (PHP)

How can I use php to convert images (.jpg, jpeg, gif) to png ? If anyone knows give an example

Author: vupsen, 2015-07-26

1 answers

Will help GD:

imagepng(
    imagecreatefromstring(
        file_get_contents($filename)
    ), 
    "output.png"
);
 4
Author: Alex Belyaev, 2015-07-26 13:37:19