2

I'm using the firefox-3.5 package (Shiretoko) on Kubuntu 9.04. I've noticed that if it scales an image, unlike on Windows, it does not apply a nice bilinear or bicubic filter to it. In other words, they look ugly.

Is there a hack to enable this or will I just have to wait for the developers to implement it?

1 Answer 1

4

Edit: According to the bug report linked in the comments, the problem is a little more subtle. On Linux, Firefox uses a library called Cairo for image rendering, including rescaling of images. Cairo can either let graphics cards do the heavy lifting, or it can do it in software on the CPU as a fallback.

The problem is that many Linux graphics drivers do not correctly declare their capabilities, so Cairo has no idea whether or not it can offload particular types of processing (like image rescaling) to the GPU or not. So the fix is to always use the software fallback for image scaling, even when the graphics driver could do it in hardware. The FF developers decided that this was unacceptably slow and disabled it, leaving Linux users with ugly rescaling instead.

The bug report also links to a PPA that has a patched version of Cairo that uses the hardware rendering path. Presumably this will break if you have one of the offending video cards whose driver says it can to rescaling but really can't, but will work if you have a driver that behaves.

(Original answer below)

I believe that the responsibility for smooth scaling on Linux falls to the X server, which doesn't support it yet. So Firefox 3 and up knows how to tell the OS to do smooth scaling, but not every OS knows how to do it yet.

Maybe in 9.10 Karmic.

4
  • That seems a bit strange (though it could be true). How then is it that scaled images all over the system look ok? Surely they don't all use OpenGL? Oct 6, 2009 at 21:52
  • 1
    I didn't believe this, but it seems to be correct. See here for more details, and patches: bugs.launchpad.net/ubuntu/+source/cairo/+bug/217908/+viewstatus
    – Lee B
    Oct 6, 2009 at 22:35
  • bart,do you even use ubuntu? I personally think you're using Arch Linux Oct 6, 2009 at 23:56
  • Of course I use (K)ubuntu. I know what I installed and see every day ;) Oct 7, 2009 at 10:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .