Closed Bug 371316 Opened 18 years ago Closed 17 years ago

scaled images antialised around non-pixel-aligned edges

Categories

(Core :: Graphics, defect, P3)

defect

Tracking

()

RESOLVED FIXED

People

(Reporter: dbaron, Assigned: vlad)

Details

(Keywords: testcase)

Scaled images are antialiased around edges that are not pixel-aligned. The problems seem to be most visible on Windows, somewhat visible on Linux/GTK2, and least visible on Mac. Since the edges of the images and of other objects are pixel-snapped, we really shouldn't be antialiasing around the edges as though the were not pixel-snapped. This means that images that are adjacent to an object with the same color background leave a seam that should not be present, and other similar problems. Steps to reproduce: run image-* reftests in layout/reftests/pixel-rounding/
Flags: blocking1.9?
Keywords: testcase
It's possible this would be fixed by the approach I describe in bug 371434 comment 5, although some of the problematic cases cover multiple pixels so I tend to think it probably won't be.
I don't know; I think that kind of approach would work well, since whatever we're drawing from images, whether a subrect or not, needs to be pixel aligned to avoid problems.
Flags: blocking1.9? → blocking1.9+
This might be a duplicate of bug 324698, although I'm not confident in the summary there being precise enough to dupe it at this point.
Assignee: nobody → vladimir
Target Milestone: --- → mozilla1.9beta1
Looking at this more closely, it's basically 324698. I'm going to post a workaround there in a second.
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → DUPLICATE
Reopening because this is still a problem on Mac.
Status: RESOLVED → REOPENED
Resolution: DUPLICATE → ---
Priority: -- → P3
Target Milestone: mozilla1.9 M8 → ---
do we need to also disable fancy scaling on mac?
If you want to fix the reftests, probably. It's much closer to correct on Mac, but not quite there.
Due to a checkin for bug 371867, the tests as written will pass even though this underlying issue exists. Basically, to do this test, we need to use an image that has more than one distinct color value in it. I'll try to update the reftests today with a new image (probably a 3x3 square with a different color in the middle than the outside). However, that may cause failures because the smooth scaling algorithm is going to blend the middle part differently. One idea would be to test <img> vs. <div style="background: url(img.png) repeat;"> (maybe <img><img>), because drawing with repeat won't exhibit the edge sampling problem.
I've fixed the tests (replaced the test image as dbaron suggested); this is, I believe, fixed -- all the tests pass on mac.
Status: REOPENED → RESOLVED
Closed: 18 years ago17 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.