Conditions | 1 |
Paths | 1 |
Total Lines | 12 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
11 | public function convert(string $file, Conversion $conversion = null) : string |
||
12 | { |
||
13 | $pathToImageFile = pathinfo($file, PATHINFO_DIRNAME).'/'.pathinfo($file, PATHINFO_FILENAME).'.png'; |
||
14 | |||
15 | $image = imagecreatefromwebp($file); |
||
16 | |||
17 | imagepng($image, $pathToImageFile, 9); |
||
18 | |||
19 | imagedestroy($image); |
||
20 | |||
21 | return $pathToImageFile; |
||
22 | } |
||
23 | |||
51 |