Reshape of background for widescreen

It was puppyluvr I think, who posted a nice background image for Upup recently, which got me thinking that I should do something to handle background images that get distorted when rendered on a widescreen.

Some of the guys have been submitting two images to get around this problem.

Okay, I have made a start at fixing this. So far it is only for the default image when PUPMODE=5 (first boot). That is /usr/share/backgrounds/default.jpg.

In /root/.xinitrc I have added a line that calls /usr/sbin/jpeg_reshape. The latter is a script that will truncate the image vertically if widescreen is detected. It uses the 'pamdice' utility in the 'netpbm' package (and I had to add that, as Puppy has a cutdown netpbm).

It is crude, as it just cuts the bottom off the image so that it has the right proportions. So you guys, if you create a background image, it will be ok to create just one, for a "normal" screen. Make sure that the image still looks ok if a strip is cut off the bottom!

But what I have not yet done, and plan to do, is make the script a bit more generic, accept an image file as passed parameter, and call it from Nathan's Wallpaper Setter.

Posted on 6 Jul 2009, 10:31


Posted on 6 Jul 2009, 16:45 by smil99
building dpup476
This is not related to this post but I hope you will have some time and look it.

I tried building a 476 version of dpup and got stuck at a point in ./0setup where it says:

"Checking that compat-distro pkgs specified in PKGS_SPECS_TABLE actually exist...
FAIL: libdrm-intel1
FAIL: libdrm-nouveau1

Finished, but some failures. You need to fix the above entries in
Search for suitable packages in these files:
Or, search online. In the case of Debian or Ubuntu, you can search
at or
After you have fixed PKGS_SPECS_TABLE, run this script again."

I have tried searching and correcting these in the PKGS_SPECS_TABLE in file DISTRO_PKGS_SPECS-debian but doesn't seem to find them. Any direction towards overcoming this error would be highly appreciated.

Another suggestion:
Considering the numerous problems that keep surfacing in building jauntypup and karmicpup with xorg 7.4, I dare suggest that development be shifted towards dpup which also look very promising.


Posted on 6 Jul 2009, 19:46 by BarryK
Re: libdrm
Ah, you need to use some initiative... go to and do a search for packages named "libdrm" -- Lenny does not have those two. However they do exist in some other versions of Debian.

To do a Woof build for any particular compatible-distro, you may have to tweak PKGS_SPECS_TABLE, and in the case of Debian, is your best friend for doing this.

So, it looks like you should just delete those two.

Posted on 6 Jul 2009, 20:05 by BarryK
I have renamed 'jpeg_reshape' to 'background_reshape' as in future it may support other than just jpeg.

I have integrated 'background_reshape' into Nathan's Wallpaper Setter. It gets called if 'Stretched' mode is chosen.

Note that the original image is kept, so the Wallpaper Setter will handle the image ok if the screen proportions are changed.

Posted on 7 Jul 2009, 16:09 by aragonaragon
Re: Reshape
wouldn't it be better to cut 1/2 at the top and 1/2 at the bottom? so wallpapers with centered pics/text be ok.


Posted on 7 Jul 2009, 16:32 by BarryK
Cut image top and bottom
Yes probably. I used the 'netpbm' utilities, and it was easy to cut off the bottom using 'pamdice', but I did not see how to cut top and bottom -- though I'm sure there is a utility that would do it.

I did look at a few background images that some of the guys have created, and they are still looking okay with the bottoms lopped off.

Posted on 7 Jul 2009, 18:20 by aragonaragon
Re: Cut image top and bottom
maybe pamcut (also from netpbm) could do the trick?


Posted on 8 Jul 2009, 12:55 by BarryK
Re: pamcut
Yes, that might do the job. I'll try it.