php - How to convert PNG binary content to WEBP keeping transparency
Get the solution ↓↓↓How can I convert a png image binary content to webp keeping transparency?
I have:
imagewebp(imagecreatefromstring($binaryContent), $input, $quality);
I've tried:
$img = imagecreatefromstring($binaryContent);
imagealphablending($img, false);
imagesavealpha($img, true);
imagewebp($img, $input, $quality);
but it's not keeping transparency. Any idea?
Share solution ↓
Additional Information:
Link To Answer People are also looking for solutions of the problem: a non well formed numeric value encountered
Didn't find the answer?
Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.
Similar questions
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.