I am trying to take a file by reference in a new-fashioned format and save it in a PNG format. Here is an example of the file that I take on the link.
Here is the code that works correctly with other files, and it gives an error with this file or other photos from the Googleme play directory.
// Load the WebP file $im = imagecreatefromwebp('http://sdev.ml/1.webp'); // Convert it to a jpeg file with 100% quality imagejpeg($im, 'example.jpeg', 100); imagedestroy($im);
But I get the following errors:
Warning: imagecreatefromwebp(): WebP decode: fail to decode input data in W:\domains\gpget.ru\index.php on line 107 Warning: imagecreatefromwebp(): 'http://sdev.ml/1.webp' is not a valid WEBP file in W:\domains\gpget.ru\index.php on line 107 Warning: imagejpeg() expects parameter 1 to be resource, boolean given in W:\domains\gpget.ru\index.php on line 110 Warning: imagedestroy() expects parameter 1 to be resource, boolean given in W:\domains\gpget.ru\index.php on line 111