Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xwallpaper: failed to parse 1600px-Sunflower_from_Silesia2.jpg #22

Closed
thomas10-10 opened this issue Jun 2, 2020 · 8 comments
Closed

Comments

@thomas10-10
Copy link

thomas10-10 commented Jun 2, 2020

Hi,
I can't get Xwallpaper to work. I have the following error:
xwallpaper: failed to parse 1600px-Sunflower_from_Silesia2.jpg
What does this error message mean?
The image works with feh.

Thank you

Image link: https://upload.wikimedia.org/wikipedia/commons/thumb/4/41/Sunflower_from_Silesia2.jpg/1600px-Sunflower_from_Silesia2.jpg

@stoeckmann
Copy link
Owner

Thank you for your report and supplying an input file so I can test it directly.

First off: Is this a problem with this specific file or with JPG files in general, i.e. is your xwallpaper instance compiled with jpeg support?

It is weird, because I have no issue using it (exact call was: xwallpaper --zoom Sunflower_from_Silesia2.jpg).

So there must be a difference between my setup and yours. What I would like to know is:

  • your system architecture (uname -m)
  • your libjpeg library in use and its version (depends on your distribution how to look up)
  • linker information about xwallpaper (ldd $(which xwallpaper))
  • output of xwallpaper in debug mode (xwallpaper --debug --zoom Sunflower_from_Silesia2.jpg)

I have tested on amd64 with libjpeg-turbo 2.0.4.

A wild guess is that your libjpeg implementation is not libjpeg-turbo and that I unfortunately use a feature which your library does not have. But then again I wonder why you or distributors of the binary have been able to compile xwallpaper.

@kadadot216
Copy link

Hello, I have encountered the same issue as described.

Have compiled a first time, but it did not warn me about the missing libjpeg-turbo library.
Installed it from dnf, then recompiled a second time and it works this time!

If it didn't warned me about the missing libjpeg-turbo, it is because it has linked the program against the legacy libjpeg one?

Anyway thank you for this piece of software! :)

@stoeckmann
Copy link
Owner

Hi kadadot216,

it is perfectly fine for xwallpaper if libjpeg/libjpeg-turbo is missing, because JPEG support is optional. Same is true for PNG and XPM. The rational behind this is that not every system has support for these types, although such a system is probably quite rare.

In my case it's a default OpenBSD installation which has only libXPM. I can use that system for basic development purposes which do not require a browser (otherwise their dependencies would pull in JPEG and PNG anyway).

I'll close this issue since you and I have only reproduced it due to missing JPEG support. Also it's a month since thomas-10-10 opened this issue and did not reply again.

Thank you too for adding a comment to this issue.

@mathstylish
Copy link

What's the solution for this problem? I'm on a fresh Arch install and i've installed xwallpaper but i get the same error

@stoeckmann
Copy link
Owner

stoeckmann commented Sep 5, 2022

Have you compiled xwallpaper by source? The solution was to install libjpeg-turbo package before compiling.

If you have installed the xwallpaper package itself, then please run ldd xwallpaper and post the output, and use the --debug option and post the output.

@mathstylish
Copy link

mathstylish commented Sep 5, 2022

Have you compiled xwallpaper by source? The solution was to install libjpeg-turbo package before compiling.

If you have installed the xwallpaper package itself, then please run ldd xwallpaper and post the output, and use the --debug option and post the output.

Fortunately (or unfortunately) I already installed it from the source code, I installed the dependencies before installation. In the arch repositories I looked at the dependencies for that specific package and also installed it, but the same error.

PS: feh didn't work either, with a different error of course

output: xwallpaper --debug --zoom mach-os/wallpaper/wallpaper01.jpg

loading mach-os/wallpaper/wallpaper01.jpg
failed to parse input as (RGB) JPEG
failed to parse XPM file
xwallpaper: failed to parse mach-os/wallpaper/wallpaper01.jpg

output ldd (inside xwallpaper source code): ldd xwallpaper

linux-vdso.so.1 => linux-vdso.so.1 (0x00007fff346dc000)
libpixman-1.so.0 => /usr/lib/libpixman-1.so.0 (0x00007fb3848e6000)
libxcb-image.so.0 => /usr/lib/libxcb-image.so.0 (0x00007fb3848e0000)
libxcb-shm.so.0 => /usr/lib/libxcb-shm.so.0 (0x00007fb3848db000)
libxcb-util.so.1 => /usr/lib/libxcb-util.so.1 (0x00007fb3848d3000)
libxcb.so.1 => /usr/lib/libxcb.so.1 (0x00007fb3848a8000)
libseccomp.so.2 => /usr/lib/libseccomp.so.2 (0x00007fb384888000)
libxcb-randr.so.0 => /usr/lib/libxcb-randr.so.0 (0x00007fb384873000)
libjpeg.so.8 => /usr/lib/libjpeg.so.8 (0x00007fb3847ce000)
libpng16.so.16 => /usr/lib/libpng16.so.16 (0x00007fb384797000)
libz.so.1 => /usr/lib/libz.so.1 (0x00007fb38477d000)
libXpm.so.4 => /usr/lib/libXpm.so.4 (0x00007fb384769000)
libX11.so.6 => /usr/lib/libX11.so.6 (0x00007fb384626000)
libc.so.6 => /usr/lib/libc.so.6 (0x00007fb38443d000)
libm.so.6 => /usr/lib/libm.so.6 (0x00007fb384355000)
/lib64/ld-linux-x86-64.so.2 => /usr/lib64/ld-linux-x86-64.so.2 (0x00007fb3849ad000)
libXau.so.6 => /usr/lib/libXau.so.6 (0x00007fb384350000)
libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0x00007fb384348000)

@stoeckmann
Copy link
Owner

If feh fails as well: Can you run file wallpaper01.jpg to see if it is really a JPEG file? Can you view the image in a browser or another tool? Maybe it's a JPEG format which is not supported... In that case, it would be great if you could send me the file per mail to tobias@stoeckmann.org so I can test it on my own.

@mathstylish
Copy link

If feh fails as well: Can you run file wallpaper01.jpg to see if it is really a JPEG file? Can you view the image in a browser or another tool? Maybe it's a JPEG format which is not supported... In that case, it would be great if you could send me the file per mail to tobias@stoeckmann.org so I can test it on my own.

Yes, the error is not with xwallpaper or feh. I tested sxiv and the file and they all gave an error. Apparently the error is only with the jpeg format because png worked normally. Thanks for the help, I'll try to solve it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants