[librsvg/librsvg-2.44] Add a test for a crash in filter color conversion



commit 95f41c3afaa2ad45be3f30dcd889cb2229935cdd
Author: Ivan Molodetskikh <yalterz gmail com>
Date:   Fri Dec 14 10:21:44 2018 +0300

    Add a test for a crash in filter color conversion

 .../feMerge-color-interpolation-srgb.svg           | 47 ++++++++++++++++++++++
 1 file changed, 47 insertions(+)
---
diff --git a/tests/fixtures/render-crash/feMerge-color-interpolation-srgb.svg 
b/tests/fixtures/render-crash/feMerge-color-interpolation-srgb.svg
new file mode 100644
index 00000000..c4344281
--- /dev/null
+++ b/tests/fixtures/render-crash/feMerge-color-interpolation-srgb.svg
@@ -0,0 +1,47 @@
+<!-- Test taken from the resvg test suite:
+
+     The MIT License (MIT)
+
+     Copyright (c) 2018 Reizner Evgeniy
+
+     Permission is hereby granted, free of charge, to any person obtaining a copy
+     of this software and associated documentation files (the "Software"), to deal
+     in the Software without restriction, including without limitation the rights
+     to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+     copies of the Software, and to permit persons to whom the Software is
+     furnished to do so, subject to the following conditions:
+
+     The above copyright notice and this permission notice shall be included in all
+     copies or substantial portions of the Software.
+
+     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+     IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+     FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+     AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+     LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+     OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+     SOFTWARE. -->
+<svg id="svg1" viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg";>
+    <title>color-interpolation-filters=sRGB</title>
+
+    <filter id="filter1" filterUnits="userSpaceOnUse" width="200" height="200">
+        <feGaussianBlur in="SourceGraphic" stdDeviation="1"
+                        color-interpolation-filters="sRGB" result="blur1"/>
+
+        <feGaussianBlur in="SourceGraphic" stdDeviation="1"
+                        color-interpolation-filters="linearRGB"/>
+        <feOffset dx="40" dy="40" result="blur2"/>
+
+        <feMerge color-interpolation-filters="sRGB">
+            <feMergeNode in="blur1"/>
+            <feMergeNode in="blur2"/>
+        </feMerge>
+    </filter>
+    <g id="g1" filter="url(#filter1)">
+        <rect id="rect1" x="40" y="40" width="40" height="40" fill="yellow"/>
+        <rect id="rect2" x="60" y="60" width="40" height="40" fill="blue"/>
+    </g>
+
+    <!-- image frame -->
+    <rect id="frame" x="1" y="1" width="198" height="198" fill="none" stroke="black"/>
+</svg>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]