Closed
Bug 603584
Opened 14 years ago
Closed 14 years ago
Filter feDisplacementMap broken
Categories
(Core :: SVG, defect)
Core
SVG
Tracking
()
RESOLVED
FIXED
mozilla2.0b8
People
(Reporter: jay, Assigned: longsonr)
References
()
Details
(Keywords: testcase)
Attachments
(3 files, 7 obsolete files)
593 bytes,
image/svg+xml
|
Details | |
18.89 KB,
image/tiff
|
Details | |
4.59 KB,
patch
|
Details | Diff | Splinter Review |
fill in ff nightly predominantly light
Opera and Safari dark
Reporter | ||
Comment 1•14 years ago
|
||
Reporter | ||
Comment 2•14 years ago
|
||
Assignee | ||
Comment 4•14 years ago
|
||
How have you established that Firefox is wrong and Opera/Safari is right other than it being 2 against 1?
Assignee | ||
Comment 5•14 years ago
|
||
Needs a reduced testcase.
Status: NEW → UNCONFIRMED
Ever confirmed: false
Reporter | ||
Comment 6•14 years ago
|
||
Please could you define a little better what you would expect in the testcase?
How would you like me to establish this, other than by filing a bug or taking to the working group?
in my tests before filing a bug, I ascertained that all three browsers closely agreed, when either no filter was applied, or feTurbulence only was applied.
The original fill is dark, and similar to that in Opera and Safari in the final result.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Reporter | ||
Comment 7•14 years ago
|
||
Attachment #482504 -
Attachment is obsolete: true
Reporter | ||
Updated•14 years ago
|
Status: NEW → UNCONFIRMED
Ever confirmed: false
OS: Mac OS X → All
Assignee | ||
Comment 8•14 years ago
|
||
(In reply to comment #6)
> Please could you define a little better what you would expect in the testcase?
> How would you like me to establish this, other than by filing a bug or taking
> to the working group?
If you think feDisplacementMap is wrong then that should be the only filter. The output of feTurbulence is complicated and so it makes the displacement map data complicated.
Don't use gradients in tests about filters. Don't use more than one rect with the filter on it.
> The original fill is dark, and similar to that in Opera and Safari in the final
> result.
Why are they correct? If you make the testcase simple enough we should be able to work out where the colours are coming from. With feTurbulence we can't really as the exact pixel colours of the turbulence vary so much across the surface and are not directly accessible.
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: All → Mac OS X
Assignee | ||
Comment 9•14 years ago
|
||
OK I wrote that before comment 7. Just the turbulence to remove now.
Assignee | ||
Comment 10•14 years ago
|
||
Alternatively, see bug 584322. Can you figure out why this example (https://bugzilla.mozilla.org/attachment.cgi?id=462849) which also uses turbulence and displacement map now gives the same result as Opera whilst yours does not. If you adjust your filter attributes till you find what makes the difference we may get somewhere.
Reporter | ||
Comment 11•14 years ago
|
||
Reporter | ||
Comment 12•14 years ago
|
||
Attachment #482509 -
Attachment is obsolete: true
Attachment #482523 -
Attachment is obsolete: true
Reporter | ||
Comment 13•14 years ago
|
||
#10 Robert, this uses the identical filter to 584322,
which is hard to credit...
but at least on OS X the hue is lighter, whereas darker in Opera & Safari.
the only action I took was to widen the rectangle as when the scale="50"
the distortion is great for a narrow rectangle.
Reporter | ||
Comment 14•14 years ago
|
||
Attachment #482505 -
Attachment is obsolete: true
Reporter | ||
Comment 15•14 years ago
|
||
4.0b8pre os x 10.6.4
Assignee | ||
Comment 16•14 years ago
|
||
It all comes down to whether the output of feDisplacementMap should be premultiplied or not.
The specification clearly says how to treat the inputs (in1 and in2) http://www.w3.org/TR/SVG/filters.html#feDisplacementMapElement it does not say how to treat the output. Should that be affected by color-interpolation-filters or should it always be SRGB, LINEARRGB or whatever in1 is or even whatever in2 is.
Firefox takes the output as being whatever colour space is defined by color-interpolation-filters i.e. if in1 starts as LINEARRGB then it finishes as LINEARRGB. It seems like Opera and Safari assume it is SRGB.
This needs taking up with the w3c as it is unclear what is correct.
Status: NEW → UNCONFIRMED
Ever confirmed: false
Updated•14 years ago
|
Reporter | ||
Comment 17•14 years ago
|
||
Assignee | ||
Comment 18•14 years ago
|
||
in1 is the source image and in2 supplies the displacements. So it does not make sense that applying in2 should change the colour space of the output. The output colour space should be whatever in1 is.
Assignee: nobody → longsonr
Status: UNCONFIRMED → NEW
Ever confirmed: true
Attachment #483817 -
Flags: review?
Assignee | ||
Updated•14 years ago
|
Attachment #483817 -
Flags: review? → review?(roc)
Giving OperatesOnSRGB a side effect and relying on it being called with aInput==0 before aInput==-1 is really ugly. Can we do this in a better way?
Assignee | ||
Updated•14 years ago
|
Attachment #483817 -
Flags: review?(roc)
Assignee | ||
Comment 20•14 years ago
|
||
Attachment #485491 -
Flags: review?(roc)
Assignee | ||
Comment 21•14 years ago
|
||
Attachment #485491 -
Attachment is obsolete: true
Attachment #485497 -
Flags: review?(roc)
Attachment #485491 -
Flags: review?(roc)
Assignee | ||
Comment 22•14 years ago
|
||
Comment on attachment 485497 [details] [diff] [review]
without the no-op line this time
still think I can make this neater
Attachment #485497 -
Flags: review?(roc)
Assignee | ||
Comment 23•14 years ago
|
||
Comment on attachment 485497 [details] [diff] [review]
without the no-op line this time
I tried restructuring it again without success so this is the best I've come up with.
Attachment #485497 -
Flags: review?(roc)
Assignee | ||
Comment 24•14 years ago
|
||
Plan c) would be to create a new nsTArray of pointers to images. Then pass that through to the GetxxxColorMap methods. GetOutputColorMap would then work as it would have the in1 image. However this really isn't required if we keep the code in nsSVGFilterInstance to use the in1 image as the output colour map.
Attachment #485497 -
Flags: review?(roc) → review+
Assignee | ||
Comment 25•14 years ago
|
||
Comment on attachment 485497 [details] [diff] [review]
without the no-op line this time
straightforward patch with reftest.
Attachment #485497 -
Flags: approval2.0?
Attachment #485497 -
Flags: approval2.0? → approval2.0+
Assignee | ||
Comment 26•14 years ago
|
||
Attachment #483817 -
Attachment is obsolete: true
Attachment #485497 -
Attachment is obsolete: true
Assignee | ||
Updated•14 years ago
|
Keywords: checkin-needed
Assignee | ||
Updated•14 years ago
|
Whiteboard: [c-n: after 2.0b7 freeze]
Comment 27•14 years ago
|
||
Status: NEW → RESOLVED
Closed: 14 years ago
Keywords: checkin-needed
OS: Mac OS X → All
Resolution: --- → FIXED
Whiteboard: [c-n: after 2.0b7 freeze]
Target Milestone: --- → mozilla2.0b8
Reporter | ||
Comment 28•14 years ago
|
||
is this fix in the trunk?
the latest nightly dated today's date, remains predominantly light, as opposed to dark.
Comment 29•14 years ago
|
||
The fix will be in the next nightly.
Assignee | ||
Updated•13 years ago
|
Flags: in-testsuite+
You need to log in
before you can comment on or make changes to this bug.
Description
•