! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Weird "banding" problem rendering smooth gradients in desktop backdrop and gq...


Description Jaime 2005-04-24 23:36:54 CEST

I use a jpeg image with a smooth gradient (http://www.sadeem.net/wp/linux.jpg)
for my desktop backdrop, but it doesn't appear to be displayed correctly
whenever I use it for my desktop backdrop or when  I view it in gqview. Whenever
I view the same jpeg image in either firefox of epiphany, it looks fine. It's
quite difficult to explain in words - I think the attached screenshot should
make sense however.

I get exactly the same results from the xfld live cd, from ubuntu hoary's
"native" xfce packages, and from debian testing with the debian packages at

Reproducible: Always
Steps to Reproduce:
1. Fresh install of xfce
2. Download http://www.sadeem.net/wp/linux.jpg
3. View image in web browser (firefox/epiphany) and in gqview. Also set it as
the desktop backdrop.

Actual Results:  
There's a "banding" problem visible in gqview and in the desktop backdrop, but
the  image looks fine in epiphany/firefox.

Expected Results:  
The image should look the same in all three situations.
Comment 1 Jaime 2005-04-24 23:42:03 CEST
Created attachment 216 
Screenshot of problem

This is a screenshot of the same image viewed three ways: as desktop backdrop,
in gqview, and in epiphany - only epiphany is rendering it correctly.
Comment 2 Brian J. Tarricone (not reading bugmail) 2005-04-25 02:56:27 CEST
I can't reproduce this, both when scaling the image up and down.  gqview renders
the image properly on my machine as well.  Perhaps your X color depth is set too
low for the standard image renderers to work?  Perhaps gecko manages to
compensate for this somehow (though I can't really imagine how).
Comment 3 Jaime 2005-04-25 20:05:18 CEST
Created attachment 217 
Another screenshot of desktop

Here's another screenshot - this time of the desktop with *no* image, just the
default coloured gradient. Perhaps this helps narrow down where the problem
might be...?

Comment 4 Brian J. Tarricone (not reading bugmail) 2005-04-25 20:38:22 CEST
Not really.  If you'd check the thing I suggested might be the problem, that
would be helpful.
Comment 5 Jaime 2005-04-26 00:01:16 CEST

I'm running xorg 6.8.2 at 16 bit colour depth (24 bit depth causes problems for
this card, but 16 bit has always worked OK in the past). Incidentally, I've now
reproduced the same problem on another (different) machine, and I've discovered
the following:

a) It's not dependent on the graphics card/xserver - same problem with savage IX
(savage driver) and nvidia GeForce2 mx400 (nv driver).

b) I only get the problem at 16-bit colour depth (24-bit colour depth on the
nvidia machine works fine).

c) At 16-bit, the following apps render OK: gimp, eog, gthumb, firefox,
epiphany, gnome-desktop. The following apps do *not* render OK: gqview,

Would x.org logs and xdpyinfo output help?

Comment 6 Brian J. Tarricone (not reading bugmail) 2005-04-26 00:30:32 CEST
Yep, as I expected.  The 16-bit display is the problem.  AFAIK, there are a
couple possibilities here:

gdk_pixbuf_scale() sucks at lower bit depths.

gdk_pixbuf_composite() sucks at lower bit depths.

gdk_pixbuf_render_pixmap_and_mask() sucks at lower bit depths.

Now...  The GdkPixbuf that's initially created for the backdrop uses 8 bits per
pixel, and _scale() and _composite() shouldn't be able to change that, and
shouldn't care about the X visual being used (as they're all client-side).

So that leaves gdk_pixmap_render_pixmap_and_mask().  Perhaps it's not dithering

OR, maybe I'm going about this the wrong way.  Maybe it's dithering like it's
supposed to, but that's just a bad thing to make it do.  Perhaps the initial
GdkPixbuf should be created with the bit depth of the X visual used for the
desktop window.  Of course, this would totally break the current gradient code,
and make writing a replacement a PITA.

Anyone else on xfce-bugs with a clue, feel free to chime in ^_~.
Comment 7 Jaime 2005-05-02 09:40:20 CEST

I posted info about the gqview problem to the gqview-users mailing list on
sourceforge, and received a reply from John Ellis that fixes the gqview
rendering issue. The posts are here:


So now, it's only the desktop image that's still broken - both epiphany and
gqview are rendering fine. I'm not sure whether this information helps, but I
thought I'd post it all the same...

Comment 8 Brian J. Tarricone (not reading bugmail) 2005-05-02 18:28:34 CEST
Great, sounds good.  I don't really know all that much about graphics, so info
from someone who does is quite useful.  Anyway, I modified xfdesktop to use a
higher-quality dithering level if the window bit-depth is below 24.

Could you test this version of xfdesktop for me?
Comment 9 Brian J. Tarricone (not reading bugmail) 2005-05-07 06:02:18 CEST
committed the fix for it, we'll see if it works.

Bug #922

Reported by:
Reported on: 2005-04-24
Last modified on: 2009-07-14


Brian J. Tarricone (not reading bugmail)
CC List:
0 users



Screenshot of problem (406.58 KB, image/png)
2005-04-24 23:42 CEST , Jaime
no flags
Another screenshot of desktop (26.21 KB, image/png)
2005-04-25 20:05 CEST , Jaime
no flags

Additional information