NConvert doesn't support webp input?

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

Moderators: XnTriq, xnview

mbm
Posts: 15
Joined: Thu Mar 10, 2016 2:40 pm

NConvert doesn't support webp input?

Postby mbm » Thu Mar 10, 2016 2:51 pm

At first I thought it might be an issue of the older version (6.17) available for the Mac, but v6.80 on Windows fails as well.

nconvert -i 005-00.webp -o jpg
** NCONVERT v6.17 (c) 1991-2011 Pierre-E Gougelet (Sep 17 2012/10:53:49) **
Version for MacOS X (All rights reserved)
** This is a freeware software (for non commercial use)

Error: Don't know how to read this picture (005-00.webp)

Error: Can't open file (-o)

Error: Can't open file (jpg)



The images read and convert fine with the current version of XnConvert. The info page for nConvert seems to indicate that webp is supported (points to the same list pf "500 formats" as XnConvert and XnView).

Am I missing something?

Is there some other way to script webp to jpg file conversions on the Mac? I see no way to script XnConvert.

Thanks

mbm
Posts: 15
Joined: Thu Mar 10, 2016 2:40 pm

Re: nConvert doesn't support webp input?

Postby mbm » Thu Mar 10, 2016 3:33 pm

Also tried the syntax:

nconvert -out jpeg 005-00.webp


which also failed

Error: Don't know how to read this picture (005-00.webp)


jpg to png worked fine with the same syntax.

Rechecked the supported formats and webp is listed as supported for both read and write at http://www.xnview.com/en/nconvert/#formats

WebP ✓ ✓ webp, wep


Very frustrating.

cday
XnThusiast
Posts: 1466
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: nConvert doesn't support webp input?

Postby cday » Thu Mar 10, 2016 5:32 pm

The following code works for me in Windows 7 SP1 x64 using the attached WEBP file:

Code: Select all

nconvert -out jpeg WEBP_Example.webp

Tested using NConvert 6.82 x32 with the webp.dll x32 plug-in placed in a directory plugins in the same directory as NConvert.

I don't know which plug-in you use on a Mac but if you can open a WEBP file using XnConvert you evidently have one; the plug-in x32 or x64 must match the NConvert x32 or x64 version you are using, if that is relevant on a Mac.

WEBP_Example.zip
(172.99 KiB) Downloaded 55 times

mbm
Posts: 15
Joined: Thu Mar 10, 2016 2:40 pm

Re: NConvert doesn't support webp input?

Postby mbm » Thu Mar 10, 2016 9:59 pm

Thanks for the info. I don't see 6.82 for Windows on the download page, just 6.80 (and the older 6.17 for Mac although I'm not sure this affects webp support). Is there another, newer distribution?

The developer is calling an external dynamic library in order to handle webp files. In the case of the Mac OS, the library is named webp.dylib and is embedded in the app bundle of XnConvert (there is also a libqwebp.dylib, but this appears to be just a stub for Qtgui.). However placing a copy of the file in the same directory as nConvert doesn't work on the Mac. It suggests the external library calls aren't coded on the Mac version. Not sure why this is so, since it's definitely possible to call dynamic libraries on the Mac (see https://developer.apple.com/library/mac ... aries.html). Even better would be to rebuild as a static library unless the webp license forbids this.

Other possibilities are the library path or fallback path do not include the the current working directory. But digging through the Usage.txt, I found this:

Some exotical [sic] image formats use external DLL's and are available on Win32 only.


Looks like webp is not supported on Mac, Linux or even 64-bit versions of Windows. Looking through the Formats.txt included with both 6.17 (Mac) and 6.80 (Windows) I can find no reference to webp at all.

The nConvert webpage needs some revisions as it is definitely inaccurate.

For the sake of completeness these are the formats listed as Windows only in the file included in 6.80:

Code: Select all

[awd]      AWD                                      awd                             Windows only, Plugin required
[dwg]      AutoCAD DWG                              dwg                             Windows only, Third Party Plugin required (http://www.cadsofttools.com)
[dxf]      AutoCAD DXF                              dxf                             Windows only, Third Party Plugin required (http://www.cadsofttools.com)
[bmf]      BMF                                      bmf                               Windows only, Plugin required
[cgm]      CGM                                      cgm                             Windows only, Third Party Plugin required (http://www.cadsofttools.com)
[wlm]      CompW                                    wlm                             Windows only, Plugin required
[djvu]     DjVu                                     djvu djv iw4                    Windows only, Plugin required
[eri]      ERI-chan (Entis Rasterized Image)        eri                             Windows only, Plugin required
[ecw]      Enhanced Compressed Wavelet              ecw                             Windows only, Plugin required
[fif]      FIF (Iterated System)                    fif                             Windows only, Plugin required
[pwc]      Fast Piecewise-constant                  pwc                             Windows only, Plugin required
[fpx]      FlashPix Format                          fpx                             Windows only, Plugin required
[hpgl]     HPGL-2                                   hp hpg hgl plt hpgl prn prt spl Windows only, Third Party Plugin required (http://www.cadsofttools.com)
[wic]      J Wavelet Image Codec                    wic                             Windows only, Plugin required
[jbig]     JBIG                                     jbg bie jbig                    Windows only, Plugin required
[jb2]      JBIG-2                                   jb2                             Windows only, Plugin required
[mjpg]     JPEG 8BIM header (Mac)                   jpg jpeg jif jfif J jpe         Windows only, Plugin required
[jpc]      JPEG-2000 Code Stream                    jpc                             Windows only, Plugin required
[jp2]      JPEG-2000 JP2 File Format                jp2 j2k jpx jpf                 Windows only, Plugin required
[jls]      JPEG-LS                                  jls                             Windows only, Plugin required
[jng]      Jpeg Network Graphics                    jng                             Windows only, Plugin required
[ldf]      LuraDocument Format                      ldf                             Windows only, Plugin required
[ldfjpm]   LuraDocument.jpm Format                  jpm                             Windows only, Plugin required
[lwf]      LuraWave Format                          lwf                             Windows only, Plugin required
[lwfjpc]   LuraWave JPEG-2000 Code Stream           jpc                             Windows only, Plugin required
[lwfjp2]   LuraWave JPEG-2000 Format                jp2 j2k jpx jpf                 Windows only, Plugin required
[sid]      MrSid                                    sid                             Windows only, Plugin required
[p2]       Pic2                                     p2                              Windows only, Plugin required
[svg]      SVG                                      svg                             Windows only, Third Party Plugin required (http://www.cadsofttools.com)
[sff]      Structured Fax Format                    sff                             Windows only, Plugin required
[iwc]      WaveL                                    iwc                             Windows only, Plugin required
[ypc]      Whypic                                   ypc                             Windows only, Plugin required
[wmf]      Windows & Aldus Metafile                 wmf                             Windows only
[emf]      Windows Enhanced Metafile                emf                             Windows only

User avatar
xnview
Author of XnView
Posts: 27557
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: NConvert doesn't support webp input?

Postby xnview » Fri Mar 11, 2016 8:23 am

put webp.dylib in a subfolder Plugins of NConvert
Pierre.

mbm
Posts: 15
Joined: Thu Mar 10, 2016 2:40 pm

Re: NConvert doesn't support webp input?

Postby mbm » Fri Mar 11, 2016 6:04 pm

Thank you for the reply but I'm confused by the instructions. nConvert is a single binary not an app bundle, so I'm not sure what a "subfolder of NConvert" means. I tried putting a folder named Plugins with webp.dylib in the same directory as nConvert. I still receive the same error.

→ ./nconvert -out jpeg 005-00.webp
** NCONVERT v6.17 (c) 1991-2011 Pierre-E Gougelet (Sep 17 2012/10:53:49) **
Version for MacOS X (All rights reserved)
** This is a freeware software (for non commercial use)

Error: Don't know how to read this picture (005-00.webp)


Here is the test setup:

→ tree
.
├── 005-00.webp
├── 005-01.webp
├── 005-02.webp
├── Plugins
│   ├── Xjp2.dylib
│   └── webp.dylib
└── nconvert



Could you be more specific, preferably with the full expected library path (e.g. /usr/local/lib) and fallback path(s)?

User avatar
xnview
Author of XnView
Posts: 27557
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: NConvert doesn't support webp input?

Postby xnview » Mon Mar 14, 2016 8:26 am

mbm wrote:
→ tree
.
├── 005-00.webp
├── 005-01.webp
├── 005-02.webp
├── Plugins
│   ├── Xjp2.dylib
│   └── webp.dylib
└── nconvert


it's good, could you send me these files?
Pierre.

mbm
Posts: 15
Joined: Thu Mar 10, 2016 2:40 pm

Re: NConvert doesn't support webp input?

Postby mbm » Fri Apr 22, 2016 8:47 am

Sorry for the delay in responding. If you're still willing to look into the issue, I've uploaded the test files to:

http://www19.zippyshare.com/v/QU3u58Gs/file.html

Thanks

User avatar
xnview
Author of XnView
Posts: 27557
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: NConvert doesn't support webp input?

Postby xnview » Mon Apr 25, 2016 11:13 am

please try this version
Pierre.

mbm
Posts: 15
Joined: Thu Mar 10, 2016 2:40 pm

Re: NConvert doesn't support webp input?

Postby mbm » Sat Apr 30, 2016 11:45 am

Thanks for the effort but no bueno. Took me a minute to figure out why I was getting "-bash: ./nconvert: cannot execute binary file", but the attached file appears to be for Linux:

→ file nconvert
nconvert: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.15, not stripped


I'm running on a Mac.

User avatar
xnview
Author of XnView
Posts: 27557
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: NConvert doesn't support webp input?

Postby xnview » Sun May 01, 2016 9:08 am

sorry but this one
Pierre.

mbm
Posts: 15
Joined: Thu Mar 10, 2016 2:40 pm

Re: NConvert doesn't support webp input?

Postby mbm » Sun May 01, 2016 4:35 pm

That one worked with nested Plugins folder. Thank you!

Is there a default path for the nconvert plugins on Mac, or do I need to keep the nested folder one level below the binary?


Return to “NConvert”

Who is online

Users browsing this forum: No registered users and 1 guest