I like to change my desktop background every once in a while, for variety. A friend of mine has tons of desktop images, and he told me he got almost all of them from a site called webshots.com. I went there and found hundreds of great-looking desktop wallpapers (or backgrounds) to choose from. The only problem is they use a proprietary file format that cannot be read by a normal graphics tool. They have software to convert or display the images for Windows, but nothing is available for Linux users to access the JPEGs. On Google I found code for a converter, but after compiling and trying it out, it didn’t work entirely.
So I fixed it.
There are two main formats of their file format; one with the JPEG just sitting there with lots of other junk around it, and two, an encrypted version. I don’t know how the original author of the code knew about the encryption or how to decrypt it, but that part was already working so I left it alone. The only part I changed was the plain format that contains a JPEG file. I also reformatted the entire code for readability.
I haven’t done extensive testing, but it has converted all the files I’ve downloaded so far. I don’t believe there are any legal issues to be concerned about by making the code available because the files can be downloaded from the site for free and since there isn’t any software on Linux to view them, it just lets Linux users do the same thing that Windows users can do.
According to the Webshots FAQ, they are planning to write a Linux version, but until that happens, this utility permits Linux users to use their images for desktops, and some of their desktop images are spectacular.
Here’s the updated source code and here’s the original code. Let me know if you have any questions or problems.