Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question
add comment

1 Answer

up vote 4 down vote accepted

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.

share|improve this answer
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? –  Bart van Heukelom Oct 6 '09 at 21:52
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 '09 at 22:35
bart,do you even use ubuntu? I personally think you're using Arch Linux –  Mahmoud Hossam Oct 6 '09 at 23:56
+1 nice explanation –  quack quixote Oct 7 '09 at 5:49
Of course I use (K)ubuntu. I know what I installed and see every day ;) –  Bart van Heukelom Oct 7 '09 at 10:12
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.