Closed Bug 366942 Opened 17 years ago Closed 17 years ago

(Windows-only) scaling down images results in distortion

Categories

(Core :: Graphics: ImageLib, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

VERIFIED DUPLICATE of bug 98971

People

(Reporter: jeff, Unassigned)

References

()

Details

User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en) AppleWebKit/418.9.1 (KHTML, like Gecko) Safari/419.3
Build Identifier: http://www.mozilla.com/products/download.html?product=firefox-2.0.0.1&os=win&lang=en-US

On Windows, when Firefox scales down images, the resulting scaled-down images are distorted.  It is likely that whatever API is used on Windows to scale down images does not actually resample the image, but perhaps does a "nearest neighbor" calculation.  This is true whether the image is scaled down with JavaScript, CSS, or by setting either the "width" or "height" property on the <img> tag itself.

IE7 added a proprietary CSS property specifically to address the problem.  A quick Google search for "-ms-interpolation-mode" will illuminate the issue.

It is worth noting that on Mac OS X, when FIrefox scales down images, the resulting scaled-down images are not distorted.  Although I am unclear on why, my guess is that whatever API is used on OS X to scale down images is doing some sort of resampling (perhaps bicubic?).

The result of not properly resampling the image is image distortion, rendering things like "ThickBox" (http://jquery.com/demo/thickbox/) quite poorly.  In the new web world of broadband, AJAX, etc., Firefox should be able to do as good a job on Windows as it does on OS X.  More importantly, it should *always* do a better job than IE, and in this case, it does not (since at least there is a workaround for IE7).


Reproducible: Always

Steps to Reproduce:
1. With a fairly small browser window (640x480), visit http://jquery.com/demo/thickbox/ on Firefox using Windows.  Scroll to the Examples and look at the "Gallery Images" demo.  Notice the image distortion (jagged edges).

2. With a fairly small browser window (640x480), visit http://jquery.com/demo/thickbox/ on Firefox using OS X.  Scroll to the Examples and look at the "Gallery Images" demo.  Notice that there is no image distortion (smooth edges).

Actual Results:  
Image distortion for scaled down images.


Expected Results:  
Undistorted image.
Status: UNCONFIRMED → RESOLVED
Closed: 17 years ago
Resolution: --- → DUPLICATE
I just read through *all* of the comments in bug 98971, and *this* bug is *NOT* fixed.  This bug is about a parity mismatch between Firefox on Windows and Firefox on OS X.  Today, with the most recent builds of Mozilla, this parity mismatch is still there.  Although I understand that this bug will be fixed once everything moves to use the cairo graphics library, it is still not fixed TODAY.

I understand (from reading the comments in bug 98971) that the developers have no intention of doing anything to address this issue before the cairo switch, but marking this bug as DUPLICATE is inaccurate.

The parity mismatch is still there.
Status: RESOLVED → UNCONFIRMED
Resolution: DUPLICATE → ---
It's worth noting that, as cairo integration will not ship until Firefox 3 ships, and as Firefox 3 won't ship until November (http://wiki.mozilla.org/ReleaseRoadmap), this bug going unfixed leaves the parity mismatch between IE and Mozilla alive for 11 more months.

Perhaps a point-release fix for this on top of the FF 2 builds is worth it?  There were many solutions outlined in  bug 98971.
Attachment 205595 [details] from bug 98971 shows the lack of quality when resizing downward very clearly.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: blocking1.9?
OS: All → Windows XP
I should point out, I'm referring to the lack of quality with trunk builds, which all use Cairo at this point.
(In reply to comment #2)
> I just read through *all* of the comments in bug 98971, and *this* bug is *NOT*
> fixed.  This bug is about a parity mismatch between Firefox on Windows and
> Firefox on OS X.  Today, with the most recent builds of Mozilla, this parity
> mismatch is still there.  Although I understand that this bug will be fixed
> once everything moves to use the cairo graphics library, it is still not fixed
> TODAY.
> 
> I understand (from reading the comments in bug 98971) that the developers have
> no intention of doing anything to address this issue before the cairo switch,
> but marking this bug as DUPLICATE is inaccurate.

It was and is accurate. Bugzilla is a developer tool, and developers fixed this issue by moving the trunk to Cairo.

(In reply to comment #5)
> I should point out, I'm referring to the lack of quality with trunk builds,
> which all use Cairo at this point.

That's another bug then.
Status: NEW → RESOLVED
Closed: 17 years ago17 years ago
Flags: blocking1.9?
Resolution: --- → DUPLICATE
Status: RESOLVED → VERIFIED
(In reply to comment #6)
> (In reply to comment #5)
> > I should point out, I'm referring to the lack of quality with trunk builds,
> > which all use Cairo at this point.
> 
> That's another bug then.

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