Save webp files as png

Hi,

I am trying to save webp files as png to the database. Is there any existing function to that? Your ideas are appreciated.

http://php.net/manual/en/function.imagepng.php

http://php.net/manual/en/function.imagecreatefromwebp.php