Page 1 of 2

Can't convert PNG to WebP

Posted: Tue May 18, 2021 3:27 pm
by dedbombom
nconvert -v -out webp -o 11.webp -q 80 -in png 11.png
** NCONVERT v7.80 (c) 1991-2021 Pierre-E Gougelet (Apr 27 2021/08:27:27) **
Version for Windows Xp/Vista/7 x64 (All rights reserved)
** This is freeware software (for non-commercial use)

A Portable Network Graphics (RGB) - ZIP was recognized : 11.png
Width:816 Height:624 with 256 colors
Nplanes : 1 Bitscount : 8
Bytes Per Plane : 816
xdpi : 0 ydpi : 0
Error: This picture cannot be written using this format (11.webp)

##########################Files opened: 1
Files written: 0
Files with write error: 1

Re: Can't convert to WebP

Posted: Tue May 18, 2021 7:53 pm
by cday
Do you have libwebp.dll installed in the NConvert Plugins folder?

I'm not personally familiar with WebP, but the following thread refers Converting from Jpeg to Webp.

That thread is nearly two years old, if the plugin isn't available as a direct download, I understand Pierre's reference to the 'XnView package' as referring to the plugin being included in the XnView Classic 'Extended' version download.

Re: Can't convert to WebP

Posted: Tue May 18, 2021 9:41 pm
by dedbombom
cday wrote: Tue May 18, 2021 7:53 pm Do you have libwebp.dll installed in the NConvert Plugins folder?

I'm not personally familiar with WebP, but the following thread refers Converting from Jpeg to Webp.

That thread is nearly two years old, if the plugin isn't available as a direct download, I understand Pierre's reference to the 'XnView package' as referring to the plugin being included in the XnView Classic 'Extended' version download.
Sure I have needed plugin and I've compressed tons of png's to webp without problems but just found some game that have such png images that can't be compressed to other formats (tried jpg and webp) with nconvert. Also this image can be converted with other tools such as pingo and cwebp to webp just nconvert can't process this file but I've used to it so I wanna that develpers fix this issue if possible, please...

Re: Can't convert to WebP

Posted: Wed May 19, 2021 6:16 am
by xnview
webp doesn't support 256 colors, please use -truecolors

Re: Can't convert to WebP

Posted: Wed May 19, 2021 8:15 am
by dedbombom
Now it worked, thanks! But I have 2 questions: will it affect other images if I convert all images with this switch by default and since other tools mentioned by me can convert this file it means that there were implemented some workaround for such cases so maybe u can make something similar in nconvert?

Re: Can't convert to WebP

Posted: Thu May 20, 2021 1:41 pm
by xnview
dedbombom wrote: Wed May 19, 2021 8:15 am Now it worked, thanks! But I have 2 questions: will it affect other images if I convert all images with this switch by default and since other tools mentioned by me can convert this file it means that there were implemented some workaround for such cases so maybe u can make something similar in nconvert?
If picture files are already in 24/32bits, there is no change. And yes other apps convert them automatically

Re: Can't convert PNG to WebP

Posted: Fri May 21, 2021 4:30 pm
by dedbombom
Should I create new topic for question about not able to process for nconvert webp files created with this tool https://developers.google.com/speed/webp/docs/gif2webp?

Re: Can't convert PNG to WebP

Posted: Sat May 22, 2021 6:48 am
by xnview
dedbombom wrote: Fri May 21, 2021 4:30 pm Should I create new topic for question about not able to process for nconvert webp files created with this tool https://developers.google.com/speed/webp/docs/gif2webp?
yes please

Re: Can't convert to WebP

Posted: Thu Apr 28, 2022 9:58 am
by dedbombom
xnview wrote: Thu May 20, 2021 1:41 pm
dedbombom wrote: Wed May 19, 2021 8:15 am Now it worked, thanks! But I have 2 questions: will it affect other images if I convert all images with this switch by default and since other tools mentioned by me can convert this file it means that there were implemented some workaround for such cases so maybe u can make something similar in nconvert?
If picture files are already in 24/32bits, there is no change. And yes other apps convert them automatically
Hi! I found out that with "-truecolors" switch png files with transparency after webp conversion becames broken. I've uploaded 2 webp file examples here https://workupload.com/file/YytemV7LseV with -truecolors and without (x-patreon_1.webp) and original file in attachment.

Re: Can't convert to WebP

Posted: Mon May 02, 2022 6:42 am
by xnview
it's better to use -merge_alpha, -truecolors remove alpha channel

Re: Can't convert to WebP

Posted: Mon Dec 12, 2022 6:05 pm
by dedbombom
xnview wrote: Mon May 02, 2022 6:42 am it's better to use -merge_alpha, -truecolors remove alpha channel
Thanks but merge_alpha just made image white as with truecolors. Anyway is there are a working method to convert 256 color transparent png to webp with ncovert without losing transparency coz I never spotted such problems it any other tools so it's most likely a real problem and since their developers solved somehow this problem why you can't do the same with nconvert please?

Re: Can't convert to WebP

Posted: Sat Dec 31, 2022 12:53 pm
by xnview
dedbombom wrote: Mon Dec 12, 2022 6:05 pm
xnview wrote: Mon May 02, 2022 6:42 am it's better to use -merge_alpha, -truecolors remove alpha channel
Thanks but merge_alpha just made image white as with truecolors. Anyway is there are a working method to convert 256 color transparent png to webp with ncovert without losing transparency coz I never spotted such problems it any other tools so it's most likely a real problem and since their developers solved somehow this problem why you can't do the same with nconvert please?
So if i understand correctly, you would like to convert 256 colors image with transparency as 32bits WebP, and 32bits image as 32bits WebP, right?

Re: Can't convert to WebP

Posted: Sun Jan 01, 2023 5:58 pm
by dedbombom
xnview wrote: Sat Dec 31, 2022 12:53 pm
dedbombom wrote: Mon Dec 12, 2022 6:05 pm
xnview wrote: Mon May 02, 2022 6:42 am it's better to use -merge_alpha, -truecolors remove alpha channel
Thanks but merge_alpha just made image white as with truecolors. Anyway is there are a working method to convert 256 color transparent png to webp with ncovert without losing transparency coz I never spotted such problems it any other tools so it's most likely a real problem and since their developers solved somehow this problem why you can't do the same with nconvert please?
So if i understand correctly, you would like to convert 256 colors image with transparency as 32bits WebP, and 32bits image as 32bits WebP, right?
Yes and no, I often convert (with nconvert) any images to webp so I just want if nconvert "spots" 256 color (png or actually any other format) images with transparency it just do its job correctly and don't stuck or just removed transparency at all. I don't care of how many bits it would have just size should be still resonable for webp. For now I tried all mentioned here commands and they all remove transparency for such files (produces white images as output).
Can you write plz fully working (tested by you first) command that convert (lossy) such file download/file.php?id=8787 to webp and don't lose transparency?

Re: Can't convert to WebP

Posted: Mon Jan 02, 2023 9:27 am
by xnview
I don't understand, by default, if you convert png->webP, the alpha is not lost
x-patreon.zip
(1.32 KiB) Downloaded 168 times

Re: Can't convert to WebP

Posted: Mon Jan 02, 2023 12:09 pm
by dedbombom
xnview wrote: Mon Jan 02, 2023 9:27 am I don't understand, by default, if you convert png->webP, the alpha is not lost
x-patreon.zip
Sry, something wrong with attached file. It wasn't 256 color, here is correct one https://workupload.com/file/N2nWPR9C3sm