Issue with converting from WEBP to JPG

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

Moderators: XnTriq, helmut, xnview

stormbreaker
Posts: 4
Joined: Tue Nov 05, 2024 10:01 pm

Issue with converting from WEBP to JPG

Post by stormbreaker »

Hi there,

I'm using nconvert (commercial version) in my company project for all sort of conversion between image format, sizes, quality, etc. I have received another case where WEBP files has to be converted into JPG. I went through the documentation and guessed that it should be fairly easy to do so. Buuuut as simple as command is I receiving failures.

I'm runnnig nconvert on k8s. I'll paste all the information I have.
  • Docker base image: eclipse-temurin:21.0.2_13-jre-jammy
  • Nconvert version: 7.192
  • Command: /opt/NConvert/nconvert -out jpeg -q 80 -rmeta -icc -resize longest 1600 -rtype lanczos -o /tmp/workspace13699137917448842041/converted/image01.jpg '/tmp/workspace13699137917448842041/image01.webp'
  • Result: Error: Don't know how to read this picture (/tmp/workspace13699137917448842041/image01.webp)\n\n** NCONVERT v7.192 (c) 1991-2024 Pierre-E Gougelet (Aug 27 2024/09:35:32) **\n Version for Linux x86 (X11) (All rights reserved)\n** This is freeware software (for non-commercial use)\n\n
  • Plugins (in Plugins folder): libsharpyuv.so libwebp.so libwebp.so.7 libwebpdecoder.so libwebpdemux.so libwebpmux.so openjp2.so
I would expect that it should work but apparently something is wrong. Can i get some help with this, please?
User avatar
xnview
Author of XnView
Posts: 44929
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: Issue with converting from WEBP to JPG

Post by xnview »

could you send us the file?
Pierre.
stormbreaker
Posts: 4
Joined: Tue Nov 05, 2024 10:01 pm

Re: Issue with converting from WEBP to JPG

Post by stormbreaker »

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

Re: Issue with converting from WEBP to JPG

Post by xnview »

you need to execute nconvert from /opt/NConvert/ folder
Pierre.
stormbreaker
Posts: 4
Joined: Tue Nov 05, 2024 10:01 pm

Re: Issue with converting from WEBP to JPG

Post by stormbreaker »

I've tried this too, no luck though. Same error as previously
User avatar
xnview
Author of XnView
Posts: 44929
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: Issue with converting from WEBP to JPG

Post by xnview »

from a shell, it works correctly :?
Pierre.
stormbreaker
Posts: 4
Joined: Tue Nov 05, 2024 10:01 pm

Re: Issue with converting from WEBP to JPG

Post by stormbreaker »

Did you try with Docker (eclipse-temurin:21.0.2_13-jre-jammy)?
User avatar
xnview
Author of XnView
Posts: 44929
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: Issue with converting from WEBP to JPG

Post by xnview »

stormbreaker wrote: Thu Nov 07, 2024 1:49 pm Did you try with Docker (eclipse-temurin:21.0.2_13-jre-jammy)?
no, currently i can't try with docker
Pierre.
mdnava
Posts: 18
Joined: Fri Mar 06, 2020 8:08 pm

Re: Issue with converting from WEBP to JPG

Post by mdnava »

stormbreaker wrote: Tue Nov 05, 2024 10:14 pm Hi there,

I'm using nconvert (commercial version) in my company project for all sort of conversion between image format, sizes, quality, etc. I have received another case where WEBP files has to be converted into JPG. I went through the documentation and guessed that it should be fairly easy to do so. Buuuut as simple as command is I receiving failures.
Pierre, in case is of any use, I tried it on Windows Subsystem for Linux (WSL) and it seems to also fail:

Code: Select all

$ mkdir test; cd test
$ wget https://i.ibb.co/NnrjzLh/image01.webp
$ wget https://download.xnview.com/NConvert-linux64.tgz
$ tar -xvzf NConvert-linux64.tgz
$ ./NConvert/nconvert -out jpeg -q 85 -rmeta -icc -resize longest 1600 -rtype lanczos -o ./new.jpg ./image01.webp

** NCONVERT v7.192 (c) 1991-2024 Pierre-E Gougelet (Aug 27 2024/09:35:32) **
        Version for Linux x86 (X11)  (All rights reserved)
** This is freeware software (for non-commercial use)

  Error: Don't know how to read this picture (./image01.webp)
On Windows it works fine..

[Added 2024-11-12 19:12:]
I also tried (in WSL) to convert from a different .webp file, and to other formats, but no success:

Code: Select all

$ ./NConvert/nconvert -out png -rmeta -icc -resize longest 1600 -rtype lanczos -o ./new.jpg ./mntest.webp 

** NCONVERT v7.192 (c) 1991-2024 Pierre-E Gougelet (Aug 27 2024/09:35:32) **
        Version for Linux x86 (X11)  (All rights reserved)
** This is freeware software (for non-commercial use)

  Error: Don't know how to read this picture (./mntest.webp)
  
$ ./NConvert/nconvert -out jpegli -q 85 -rmeta -icc -resize longest 1600 -rtype lanczos -o ./new.jpg ./mntest.webp 

Bad output format 'jpegli' 
@Stormbreaker:

In case is relevant, converting images with plain red color to JPEG can easily get them noticeable compression artifacts.
One way to minimize artifacts is to use JPEG quality of 90 or higher. Or to leave/use them as WEBP.
User avatar
xnview
Author of XnView
Posts: 44929
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: Issue with converting from WEBP to JPG

Post by xnview »

you need to execute it by ./nconvert
Pierre.
mdnava
Posts: 18
Joined: Fri Mar 06, 2020 8:08 pm

Re: Issue with converting from WEBP to JPG

Post by mdnava »

xnview wrote: Wed Nov 13, 2024 8:03 am you need to execute it by ./nconvert
Hello Pierre!
Like this?.. it seems to also fail (at least in WSL)..
(Please note that I don't normally use NConvert on any Linux, I just read the post and thought I'd test it).

Code: Select all

$ cd NConvert
$ ./nconvert -out png -rmeta -icc -resize longest 1600 -rtype lanczos -o ../new.jpg ../image01.webp

** NCONVERT v7.192 (c) 1991-2024 Pierre-E Gougelet (Aug 27 2024/09:35:32) **
        Version for Linux x86 (X11)  (All rights reserved)
** This is freeware software (for non-commercial use)

  Error: Don't know how to read this picture (../image01.webp)
  
Best regards!