poor image quality rescaling

Bug #374404 reported by zuban
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
firefox-3.0 (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Binary package hint: firefox-3.0

Summary:
when using Menu -> View -> Zoom -> Zoom In/Out, images on web page are also rescaled.
the images are obviously not rescaled using nearest neighborhood algorithm, but the image has less quality than image rescaled by gimp using linear algorithm. see http://hafik.zuban.name/public/ff/
I don't know which algorithm is used, but linear would be sufficient.
firefox version: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.7) Gecko/2009030422 Ubuntu/8.04 (hardy) Firefox/3.0.7

Steps to reproduce:
1. Open the following URL: http://launchpadlibrarian.net/27243866/road.jpg
2. Select menu: View -> Zoom -> Zoom In

Expected result:
The image is scaled up.

Actual result:
The images is distorted when scaled up: the white and yellow markings on the road in the photograph show the distortion clearly. The following screenshot has some areas of distortion highlighted: http://launchpadlibrarian.net/27244087/ScaledPhotograph.png

Resources:
1. http://launchpadlibrarian.net/27243866/road.jpg / Test photograph
2. http://launchpadlibrarian.net/27244087/ScaledPhotograph.png / Screenshot of the photograph in [1] scaled up by Firefox with distortions highlighted in red

ProblemType: Bug
Architecture: i386
Date: Sun May 10 10:59:10 2009
DistroRelease: Ubuntu 8.04
Package: firefox-3.0 3.0.7+nobinonly-0ubuntu0.8.04.1
PackageArchitecture: i386
ProcEnviron:
 LANGUAGE=en_US:en
 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: firefox-3.0
Uname: Linux 2.6.24-19-generic i686

Tags: apport-bug
Revision history for this message
zuban (zuban) wrote :
Revision history for this message
Bruno Girin (brunogirin) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. Unfortunately, after trying to reproduce on Jaunty with different images including yours, I find it difficult to identify what the expected behaviour should be compared to what it actually does. Could you please attach your screen shots to this bug and highlight in the Firefox resize screen shot what aspect of the resize you think is not handled correctly?

Changed in firefox-3.0 (Ubuntu):
status: New → Incomplete
Revision history for this message
zuban (zuban) wrote :

One more screen shot with highlighted images.

Revision history for this message
Bruno Girin (brunogirin) wrote :

OK, I managed to reproduce some obvious scaling anomalies on Jaunty using this photograph so will update the bug accordingly.

Revision history for this message
Bruno Girin (brunogirin) wrote :
description: updated
Revision history for this message
Bruno Girin (brunogirin) wrote :

Confirmed on Jaunty with package firefox-3.0 version 3.0.10+nobinonly-0ubuntu0.9.04.1

Changed in firefox-3.0 (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Tom Jaeger (thjaeger) wrote :

I'm not quite sure if your bug report regards upscaling or downscaling. For upscaling, firefox is currently using nearest-neighbor interpolation on linux, this is bug #217908. For downscaling, firefox is using bilinear interpolation, if images are rendered incorrectly, this is most likely a bug in your video driver.

Revision history for this message
Bruno Girin (brunogirin) wrote :

@Tom Jaeger, I think the original poster referred to downscaling. However, I've only been able to reproduce anomalies when upscaling. Having said this, I checked bug #217908 but it refers to blurred images when upscaling. In the example attached above, the image is not blurred when scaled but distorted (straight lines in the original are broken in the upscaled version) so it appears to be a different problem. I'll check if the smooth scaling packages in your PPA solves this issue when I am back home and have access to the laptop that shows this issue (so sometime w/c 20th July). Zuban, if you can do the same and check whether Tom's smooth scaling packages solve your problem, that'd be great. You can find Tom's post that links to his PPA here: https://bugs.launchpad.net/ubuntu/+source/firefox-3.0/+bug/217908/comments/44

Revision history for this message
Tom Jaeger (thjaeger) wrote : Re: [Bug 374404] Re: poor image quality rescaling

Bruno Girin wrote:
> @Tom Jaeger, I think the original poster referred to downscaling.
> However, I've only been able to reproduce anomalies when upscaling.
> Having said this, I checked bug #217908 but it refers to blurred images
> when upscaling.
Decidedly not. The bug is about firefox using nearest-neighbor
interpolation for upscaling, which leads to exactly the artifacts you
describe. I've updated the bug's description to hopefully make it
clearer what's going on.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.