Last Comment Bug 372462 - Improve image quality on resize.
: Improve image quality on resize.
Status: RESOLVED DUPLICATE of bug 486918
Product: Core
Classification: Components
Component: Graphics (show other bugs)
: Trunk
: All All
-- enhancement with 14 votes (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
: Milan Sreckovic [:milan]
Depends on:
Blocks: tomtom
  Show dependency treegraph
Reported: 2007-03-02 19:48 PST by Biju
Modified: 2012-10-05 11:38 PDT (History)
30 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

Resizing example (14.71 KB, image/png)
2008-11-10 03:03 PST, Wladimir Palant
no flags Details

Description User image Biju 2007-03-02 19:48:42 PST
Bug 98971 fixed major issues with image resize.
Per bug 98971 comment 146 we could improve image quality, 
especially PNG images.

See attachment 205595 [details] (quality comparison img_resize.html)
The resize algorithm used by MSPaint gives a better image than Moz...
Comment 1 User image Damian Yerrick 2007-03-09 17:59:07 PST
Downscaling and upscaling need different algorithms.  This one looks like it's
using an upscaling algo to downscale.
Comment 2 User image David E. Weekly 2007-06-14 20:26:09 PDT
Downscaling on verified to still use nearest neighbor (or something like it). Note bug 312309 likely a dup of this.
Comment 3 User image Wladimir Palant 2008-11-10 03:03:27 PST
Created attachment 347264 [details]
Resizing example

We hit the same issue in TomTom HOME, I am attaching an example. In this case we are resizing a 250x221 image to 60x53. On the left is the result in Firefox 3.0.3 (XULRunner 1.9.1b1 gives identical results) - rest are different resizing algorithms from an image editor. Second from right is "nearest neighbor" which is similar to Firefox but still a lot better.
Comment 4 User image Virtual_ManPL [:Virtual] - (ni? me) 2009-04-21 05:24:44 PDT
I report similar bug...

IMO dev team should implement Lanczos or at last BiCubic resampling for downsizing or upscaling images for the best quaity...
This methods is not very heavy for CPU, so it should works for all ppl fine...
Comment 5 User image Wladimir Palant 2009-04-21 05:37:06 PDT
You won't help your cause by spamming people. The "blocking" flags are there for a reason (, don't misuse them.
Comment 6 User image Wladimir Palant 2009-08-08 02:09:29 PDT
I just tried specifying "image-rendering: optimizeQuality" ( in Minefield build 20090807 but I don't see a significant difference. Looks like it doesn't fix this bug.
Comment 7 User image j.j. 2009-08-08 05:59:22 PDT
In Gecko 1.9.2 there is no difference between "optimizeQuality" and "auto" (default value), both use bilinear resampling. Will clarify that in the MDC CSS reference.
Comment 8 User image Henri Sivonen (:hsivonen) 2010-04-23 04:03:28 PDT
Does this bug cover the upscaling quality difference between Mac and Linux (upscaling on Linux is notably worse than on Mac)?
Comment 9 User image Henri Sivonen (:hsivonen) 2010-04-23 04:21:49 PDT
FWIW, on Linux, both Chrome and Opera have nicer image upscaling than Firefox.
Comment 10 User image Virtual_ManPL [:Virtual] - (ni? me) 2011-01-09 07:11:09 PST
Any plans for implementation this in future releases next to Firefox4 ?
Because downscaling quality in the worst compared to all other browsers...
Comment 11 User image Jeff Muizelaar [:jrmuizel] 2011-10-07 12:38:51 PDT

*** This bug has been marked as a duplicate of bug 486918 ***

Note You need to log in before you can comment on or make changes to this bug.