Closed Bug 213089 Opened 21 years ago Closed 21 years ago

Pixel sampling on large images shown small needs improvement

Categories

(Core :: Graphics: ImageLib, enhancement)

x86
Windows 2000
enhancement
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 98971

People

(Reporter: L.Wood, Assigned: jdunn)

References

()

Details

Consider the image in the top left corner of the page at the url given.
There's a photo of a lighthouse. The slope of the lighthouse is very jagged.
If you roll the mouse over this, it changes to a photo of people in front of
slanting barriers. Again, the barriers appear very jagged. And the human faces
don't look too good, either.

The jagged edges in these two images neatly illustrate the drawing-to-screen
method that mozilla uses. The images are very large, but they're being resized
to small in the page to give visual thumbnails. Mozilla is simply doing
pick-a-single-pixel-and-draw-it subsampling from the large rendered image,
rather than evaluating the block of pixels that equates to an onscreen pixel to
determine what an appropriate onscreen pixel value should be.

This unsophisticated approach to image sampling and resizing is what xv does.
It's why you should never resize and save images in xv. Use gimp instead, which
does a better sampling job. No jaggies. And if gimp can resize images well,
mozilla should be able to do it on the fly.

Improve mozilla's sampling capabilities, and the primary result, apart from
smoothing of jagged edges as shown in these sample photos, is that missized
photos of faces will begin to look like actual _faces_. (I suspect that this
will do wonders for internet dating sites. Or not.)

We have anti-aliased text in our browsers these days. We ought to have
better-aliased images when the images are deliberately resized. (This would also
matter for zooming entire rendered pages.)

*** This bug has been marked as a duplicate of 98971 ***
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.