Can't convert PNG to WebP

Discussions on NConvert - the command line tool for image conversion and manipulation

Moderators: XnTriq, xnview

dedbombom
Posts: 8
Joined: Tue May 18, 2021 3:22 pm

Can't convert PNG to WebP

Post 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
You do not have the required permissions to view the files attached to this post.
cday
XnThusiast
Posts: 3064
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: Can't convert to WebP

Post 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.
dedbombom
Posts: 8
Joined: Tue May 18, 2021 3:22 pm

Re: Can't convert to WebP

Post 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...
User avatar
xnview
Author of XnView
Posts: 36318
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: Can't convert to WebP

Post by xnview »

webp doesn't support 256 colors, please use -truecolors
Pierre.
dedbombom
Posts: 8
Joined: Tue May 18, 2021 3:22 pm

Re: Can't convert to WebP

Post 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?
User avatar
xnview
Author of XnView
Posts: 36318
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: Can't convert to WebP

Post 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
Pierre.
dedbombom
Posts: 8
Joined: Tue May 18, 2021 3:22 pm

Re: Can't convert PNG to WebP

Post 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?
User avatar
xnview
Author of XnView
Posts: 36318
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: Can't convert PNG to WebP

Post 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
Pierre.