Closed
Bug 324698
Opened 19 years ago
Closed 18 years ago
upscaling an image causes misrendering
Categories
(Core :: Graphics, defect)
Core
Graphics
Tracking
()
VERIFIED
FIXED
mozilla1.9alpha8
People
(Reporter: Peter6, Assigned: vlad)
References
(Blocks 1 open bug)
Details
(Keywords: regression, Whiteboard: cairo)
Attachments
(3 files, 2 obsolete files)
Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9a1) Gecko/20060123 Firefox/1.6a1 ID:2006012317 (Cairo)
The testcase should show a 100x100 px red tranparent square
testcase coming
Reporter | ||
Comment 1•19 years ago
|
||
Reporter | ||
Updated•19 years ago
|
Whiteboard: cairo
Reporter | ||
Comment 2•19 years ago
|
||
png does not render properly
Attachment #209605 -
Attachment is obsolete: true
Reporter | ||
Updated•19 years ago
|
Summary: Opacity is wrong → a png is not rendered properly
Reporter | ||
Comment 3•19 years ago
|
||
upscaling an image causes misrendering
this should remain a red square
Attachment #209609 -
Attachment is obsolete: true
Reporter | ||
Updated•19 years ago
|
Summary: a png is not rendered properly → upscaling an image causes misrendering
Reporter | ||
Comment 4•19 years ago
|
||
Fixed by one of the last patches (I guess vlads)
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Reporter | ||
Comment 5•19 years ago
|
||
(In reply to comment #4)
> Fixed by one of the last patches (I guess vlads)
>
Duh, it helps if i test with a cairo build , reopening (sorry for the spam)
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Assignee | ||
Comment 6•19 years ago
|
||
Yeah, not fixed yet, sorry :) But thanks for the reminder, though!
Assignee: nobody → vladimir
Status: REOPENED → NEW
Assignee | ||
Updated•19 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Comment 7•19 years ago
|
||
This is a cairo/pixman scaling bug it turns out; not in the way we're calling cairo. Upscaling with a nearest-neighbor produces the correct results. Working on a fix.. (It looks like cairo doesn't correctly align the first pixel when upscaling to be in the center of the region which will have coverage for that pixel, so everything gets pushed up and left)
Assignee | ||
Comment 8•19 years ago
|
||
*** Bug 328868 has been marked as a duplicate of this bug. ***
Comment 9•19 years ago
|
||
Downscaling images also has some problems. I'm not really sure if this is related, but check this testcase:
http://couven.dyndns.org/if12-R%fc/mathe-projekt/Jonny/test/test.htm
and the last testcase in Bug 98971
You may want to compare Opera's rendering.
Assignee | ||
Comment 10•19 years ago
|
||
Not related; downsampling is still nearest-neighbor filtering, which is picking the white/black pixels.
Comment 11•19 years ago
|
||
(In reply to comment #10)
> Not related; downsampling is still nearest-neighbor filtering
Is there a reason why that's still the case? Downsampling is just as important, especially since large standalone images are now automatically sized down.
Assignee | ||
Comment 12•19 years ago
|
||
(In reply to comment #11)
> (In reply to comment #10)
> > Not related; downsampling is still nearest-neighbor filtering
>
> Is there a reason why that's still the case?
Because noone's implemented downsampling yet.
Comment 13•19 years ago
|
||
Someone has reported similar problems <https://bugzilla.mozilla.org/show_bug.cgi?id=309036> for raster images rendered as SVG image elements in SVG documents. Is that simply a dupe of this bug as fixing Cairo would fix SVG image rendering as well?
Updated•19 years ago
|
Updated•19 years ago
|
Comment 14•19 years ago
|
||
*** Bug 341281 has been marked as a duplicate of this bug. ***
Updated•18 years ago
|
Flags: blocking1.9+
Keywords: regression
Comment 15•18 years ago
|
||
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20060807 Minefield/3.0a1 ID:2006080705 [cairo]
The behavior has changed since this bug was originally filed, I assume due to the fix at https://bugs.freedesktop.org/show_bug.cgi?id=2488 - now the testcase square fades to white at all four borders, not just the bottom and right borders. This is still undesirable IMO.
Comment 16•18 years ago
|
||
*** Bug 350107 has been marked as a duplicate of this bug. ***
Comment 17•18 years ago
|
||
an easier way to show the same bug
Comment 18•18 years ago
|
||
The above testcase should show a solid black bar. The bug causes it to blend to bgcolor at table borders, making the bar have several gradient style fills.
Assignee | ||
Comment 19•18 years ago
|
||
Just a brain dump of how to fix this:
We need to implement a new mode within pixman which will:
1) ignore any sample locations that are outside of the source image bounds (render as transparent);
2) always snap to within the source image bounds when sampling within the image.
That is, there should be a discontinuity when sampling near the edge of the image when the center of the sampling area moves outside of the image bounds.
There is no existing cairo mode for this, so something new will need to be added. Along the way, implementing the PAD mode for images would also be useful -- PAD just means that all samples go to the nearest actual source pixel, whether the sample point is within the image source or not.
Assignee | ||
Updated•18 years ago
|
Flags: blocking1.9a1+
Whiteboard: cairo → cairo [blocking1.9a1+]
Assignee | ||
Updated•18 years ago
|
Whiteboard: cairo [blocking1.9a1+] → cairo
Comment 21•18 years ago
|
||
On my system (Debian GNU/Linux 4.0 -- or very close to it), at <http://thefump.com> with GIF images (seen on the blue ones - bg_top.gif and blue_left.gif):
doesn't happen on trunks 2006011004-2006040607
happens on trunks 2006041004-2007042704
Comment 22•18 years ago
|
||
sorry, happens on trunks since 2006040704.
Assignee | ||
Updated•18 years ago
|
Target Milestone: --- → mozilla1.9beta1
Assignee | ||
Comment 24•18 years ago
|
||
Ok, this bug has sat around for long enough. I want to get this workaround in, in case we don't manage to get a real fix in for this for 1.9 -- the real fix involves doing a bunch of generic cairo work that I hoped would be done by now. This problem does not appear on XP_MACOSX -- the Quartz surface does the right thing here as far as image scaling.
This ends up disabling bilinear filtering for upsampled images, returning our rendering to what it was in Fx2. We'll have to live with this until a real fix is done.
Attachment #265603 -
Flags: review?(roc)
Attachment #265603 -
Flags: review?(roc) → review+
Assignee | ||
Comment 25•18 years ago
|
||
I've filed bug 381661 for reenabling this once the underlying bugs are fixed.
Assignee | ||
Comment 26•18 years ago
|
||
Patch to disable checked in.
Status: ASSIGNED → RESOLVED
Closed: 19 years ago → 18 years ago
Resolution: --- → FIXED
Comment 27•18 years ago
|
||
Verified on www.thefump.com and comment #3 with Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a5pre) Gecko/20070523 Minefield/3.0a5pre
Reporter | ||
Updated•18 years ago
|
Status: RESOLVED → VERIFIED
Updated•18 years ago
|
Flags: in-testsuite?
Assignee | ||
Updated•18 years ago
|
Flags: in-testsuite? → in-testsuite+
You need to log in
before you can comment on or make changes to this bug.
Description
•