SVG used as image is blury on iphone - html

I am using an SVG based 64 as an image source.
This looks fine on a desktop, but when I view on my mobile (Iphone XS MAX - Safari), this looks really blury.
See below fiddle which has two images, one is just the raw SVG, and the second is the SVG base 64 used as source.
https://jsfiddle.net/t0e4sjw3/
You can see from the screenshot below, that the one used as an image is very blury and the filter seems to be a lot bigger than on the first image.
Is there any way to stop this?
<svg
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
version="1.1"
width="110"
height="110"
>
<defs>
<filter id="dropShadow">
<feGaussianBlur in="SourceAlpha" stdDeviation="1" />
<feOffset dx="0" dy="0" result="offsetblur" />
<feFlood flood-color="black" />
<feComposite in2="offsetblur" operator="in" />
<feMerge>
<feMergeNode />
<feMergeNode in="SourceGraphic" />
</feMerge>
</filter>
</defs>
<image
xmlns="http://www.w3.org/2000/svg"
width="110"
height="110"
filter="url(#dropShadow)"
preserveAspectRatio="none"
xmlns:xlink="http://www.w3.org/1999/xlink"
xlink:href="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI2NCIgaGVpZ2h0PSI2NCI+PHBhdGggZmlsbD0iI0VEQkE2RiIgZD0iTTU0Ljk1NSAxOC4yMTZjLjIxNi0yLjU3MiA4LjQ0Ni0xLjg0IDQuNDYzLTEuMTQzLTMuMjY3LjU3Mi00LjY3MiAzLjYyLTQuNDYzIDEuMTQzek00OS4yMTIgMjEuNDMyYzUuMTctMS4zNjcgMS40MDgtMjMuODg2IDEuMDkzLTEyLjY3OC0uMjYgOS4yMDItNi4wNjggMTMuOTk1LTEuMDkzIDEyLjY3OHoiLz48bGluZWFyR3JhZGllbnQgaWQ9ImEiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIiB4MT0iMjQuMzY1IiB5MT0iMjEuODk5IiB4Mj0iMzguMjk2IiB5Mj0iNjMuNDA3Ij48c3RvcCBvZmZzZXQ9Ii4yNDgiIH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NnRHlwIg0KICAvPg0KPC9zdmc+DQo=" alt="snail" />

Related

CSS SVG filter: url(#element) not working in firefox and has strange behavior in safari

I'm writing code based off of this SVG filter, however, even this simple filter does not displace the text. Any ideas on whats wrong or how I can get this to work in firefox and safari? In firefox there is no displacement, in safari text dissapears (only in my code, not in the minimum viable code, so maybe I have another issue). Another safari issue is that zooming in and out changes where the displacement effect occurs, which is a problem as well.
This might be due to the way units are inferred by chrome vs safari vs firefox and I heard that there was an issue with firefox not being able to read non URL based filters (although it does do the non displacement part, so I think it could be a units related issue), but I'm not sure how to go about fixing it.
View in chrome to see functioning code
This is the HTML with code for the glitch mask and svg filter
html,
body {
position: relative;
background: black;
width: 100%;
height: 100%;
}
#text {
filter: url("#filter");
}
<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%">
<defs>
<!-- MASK DEFS -->
<g id="glitch-mask-left" transform="translate(0, -2.5)">
<rect x="5%" y="45%" width="7%" height="5%" fill="white" />
<rect x="60%" y="25%" width="7%" height="4%" fill="white" />
<rect x="35%" y="75%" width="10%" height="4%" fill="white" />
<rect x="25%" y="50%" width="30%" height="2%" fill="white" />
</g>
<g id="glitch-mask-right" transform="translate(0, -2.5)">
<rect x="5%" y="35%" width="11%" height="2%" fill="white" />
<rect x="60%" y="60%" width="20%" height="1%" fill="white" />
<rect x="80%" y="35%" width="20%" height="3%" fill="white" />
</g>
<filter id="filter">
<!-- FLOODS -->
<feFlood flood-color="#00E200" result="COLOR-left" />
<feFlood flood-color="#E500E6" result="COLOR-right" />
<!-- MASKS -->
<feImage xlink:href="#glitch-mask-left" result="MASK-left-shift" />
<feImage xlink:href="#glitch-mask-right" result="MASK-right-shift" />
<!-- LEFT SHIFTED -->
<feComposite in="SourceGraphic" in2="MASK-left-shift" operator="in" result="LEFT_SHIFT_10" />
<feOffset dx="-7" dy="0" in="LEFT_SHIFT_10" result="LEFT_SHIFT_20" />
<!-- RIGHT SHIFTED -->
<feComposite in="SourceGraphic" in2="MASK-right-shift" operator="in" result="RIGHT_SHIFT_10" />
<!-- RIGHT SHIFT RESULT -->
<feOffset dx="12" dy="0" in="RIGHT_SHIFT_10" result="RIGHT_SHIFT_20" />
<!-- REMAINDER -->
<feComposite in="SourceGraphic" in2="MASK-left-shift" operator="out" result="REMAINDER_10" />
<feComposite in="REMAINDER_10" in2="MASK-right-shift" operator="out" result="REMAINDER_20" />
<feMerge result="RESULT_10">
<feMergeNode in="RIGHT_SHIFT_20" /> <feMergeNode in="LEFT_SHIFT_20" />
<feMergeNode in="REMAINDER_20" />
</feMerge>
<!-- REMAINDER LEFT -->
<feComposite in="COLOR-left" in2="RESULT_10" operator="in" result="RESULT_LEFT_10" />
<feOffset dx="-4" dy="0" in="RESULT_LEFT_10" result="RESULT_LEFT_20" />
<!-- REMAINDER RIGHT -->
<feComposite in="COLOR-right" in2="RESULT_10" operator="in" result="RESULT_RIGHT_10" />
<feOffset dx="4" dy="0" in="RESULT_RIGHT_10" result="RESULT_RIGHT_20" />
<feMerge result="RESULT_20">
<feMergeNode in="RESULT_RIGHT_20" />
<feMergeNode in="RESULT_LEFT_20" />
<feMergeNode in="RESULT_10" />
</feMerge>
</filter>
</defs>
<g id="text">
<text x="50%" y="50%" text-anchor="middle" alignment-baseline="middle" font-size="100" fill="white" font-family="helvetica" line-height="0" stroke-width="0">
ANY SVG CONTENT
</text>
</g>
</svg>
Link to codepen

feComposite ignores feOffset result (except in Chrome)

I have a very simple SVG filter that produces totally different results in Chrome vs. Safari or Firefox (on Mac OS). The problem seems to center around using feComposite on an offset alpha channel. Here's my code:
<svg xmlns="http://www.w3.org/2000/svg" width="400px" height="400px" viewBox="-1 -1 2 2">
<defs>
<filter id="foo">
<feFlood flood-color="red" result="red-fill" />
<feOffset dx="0" dy="0.1" in="SourceAlpha" out="offset-text" />
<feComposite operator="in" in="red-fill" in2="offset-text" result="final" />
</filter>
</defs>
<text font-size="1px" filter="url(#foo)">1</text>
</svg>
In Chrome I see a large red digit "1", while Safari and Firefox show only a blank white canvas. If I remove the <feOffset> and use SourceAlpha directly for compositing, like so:
<svg xmlns="http://www.w3.org/2000/svg" width="400px" height="400px" viewBox="-1 -1 2 2">
<defs>
<filter id="foo">
<feFlood flood-color="red" result="red-fill" />
<feComposite operator="in" in="red-fill" in2="SourceAlpha" result="final" />
</filter>
</defs>
<text font-size="1px" filter="url(#foo)">1</text>
</svg>
...then I see the red digit "1" in all three browsers, as expected.
Why couldn't I use the <feOffset> output in <feComposite>, and is there a recommended alternative?
This is a simple fix. That "out=" should be a "result=" in your filter. (And your font-size needs to be in a style declaration (Chrome is more forgiving of bad syntax.))
<svg xmlns="http://www.w3.org/2000/svg" width="400px" height="400px" viewBox="-1 -1 2 2" >
<filter id="foo">
<feFlood flood-color="red" result="red-fill" />
<feOffset dx="0" dy="0.1" in="SourceAlpha" result="offset-text" />
<feComposite operator="in" in="red-fill" in2="offset-text" result="final"
/>
</filter>
</defs>
<text filter="url(#foo)" style="font-size:1px" >1</text>
</svg>

SVG feGaussianBlur stdDeviation value issue in IE

I have this SVG code in my HTML that renders a triangle with a shadow below it:
<svg class="svg-triangle">
<defs>
<filter id="shadow" x="0" y="0" width="200%" height="200%">
<feOffset result="offOut" in="SourceAlpha" dx="0" dy="-1" />
<feGaussianBlur result="blurOut" in="offOut" stdDeviation="2,5" />
<feBlend in="SourceGraphic" in2="blurOut" mode="normal" />
</filter>
</defs>
<polygon points="0,0 22,0 11,7" filter="url(#shadow)"/>
</svg>
That code works fine on Chrome and Firefox, but that's what happens when it get rendered on Internet Explorer 11, the gaussian blur stdDeviation value becomes:
<feGaussianBlur result="blurOut" in="offOut" stdDeviation="1.65726e+009" />
And the shadow is obviously not showed
Any ideas on why this is happening?
Thank you

Shadow for rect in svg

I need to make a shadow for rect element for svg. The snippet below does the job, but I don't know how to control the color/opacity of the shadow? Any help will be appreciated!
<svg height="120" width="120">
<defs>
<filter id="f1" x="0" y="0" width="200%" height="200%">
<feOffset result="offOut" in="SourceGraphic" dx="20" dy="20" />
<feBlend in="SourceGraphic" in2="offOut" mode="normal" />
</filter>
</defs>
<rect width="90" height="90" stroke="green" stroke-width="3" fill="yellow" filter="url(#f1)" />
Came across this w3schools page with similar examples. Based on the examples given there, it looks like you need to add few more filters (like feColorMatrix and feGaussianBlur) to bring the desired effect.
Your code with new filters:
<svg height="120" width="120">
<defs>
<filter id="f1" x="0" y="0" width="200%" height="200%">
<feOffset result="offOut" in="SourceGraphic" dx="10" dy="10" />
<feColorMatrix result="matrixOut" in="offOut" type="matrix"
values="0.2 0 0 0 0 0 0.2 0 0 0 0 0 0.2 0 0 0 0 0 1 0" />
<feGaussianBlur result="blurOut" in="matrixOut" stdDeviation="10" />
<feBlend in="SourceGraphic" in2="blurOut" mode="normal" /> </filter>
</defs>
<rect width="90" height="90" stroke="green" stroke-width="3" fill="yellow" filter="url(#f1)" />
You can use this jsfiddle also.
Update:
We can achieve opacity & color change just with feColorMatrix filter. Check this updated jsFiddle.
But, in order achieve the desired color you need to understand more about setting values attribute of feColorMatrix.
Following links may be helpful:
Match colors in feColorMatrix filter
https://developer.mozilla.org/en-US/docs/Web/SVG/Element/feColorMatrix
SVG Drop Shadow - opacity, feOffset and viewBox difficulties

SVG drop shadow with filters is truncated

I am trying to make a drop shadow for the following SVG shape:
<svg style="overflow:visible; ">
<defs>
<marker orient="auto" refY="4" refX="2" markerHeight="13" markerWidth="13" id="_x0000_s1094end">
<path style="fill:yellow; " d="M2,2 L2,6 L6,4 L2,2" />
</marker>
</defs>
<path d="M 288,164 L 108,176" style="stroke-width:8; stroke:yellow; marker-end:url(#_x0000_s1094end); " y="4" x="4"/>
</svg>
After the drop shadow the shape is suppossed to look like this (ignore the bits except for the arrow and its shadow):
I tried the following SVG:
<svg style="overflow:visible; ">
<defs>
<marker orient="auto" refY="4" refX="2" markerHeight="13" markerWidth="13" id="_x0000_s1094end">
<path style="fill:yellow; " d="M2,2 L2,6 L6,4 L2,2" />
</marker>
<filter id="f1" x="0" y="0" width="500%" height="500%">
<feOffset result="offOut" in="SourceAlpha" dx="-8" dy="-8" />
<feBlend in="SourceGraphic" in2="offOut" mode="normal" />
</filter>
</defs>
<path d="M 288,164 L 108,176" style="stroke-width:8; stroke:yellow; marker-end:url(#_x0000_s1094end); " y="4" x="4" filter="url(#f1)"/>
</svg>
http://fiddle.jshell.net/md3rT/
What I get is this:
The resulting SVG is coming out truncated.
Also, how can I change the opacity of the shadow?
Thanx in advance!
To stop truncating, just make the filter cover the shape (the drop shadow is above and to the left so the filter needs to cover that region).
<filter id="f1" x="-180%" y="-500%" width="500%" height="1000%">
<feOffset result="offOut" in="SourceAlpha" dx="-8" dy="-8" />
<feBlend in="SourceGraphic" in2="offOut" mode="normal" />
</filter>
If you want the shadow not to be opaque, something involving a non-opaque flood would seem to do the trick. For a general drop shadow you need something like this...
<feGaussianBlur in="alpha-channel-of-feDropShadow-in" stdDeviation="stdDeviation-of-feDropShadow"/>
<feOffset dx="dx-of-feDropShadow" dy="dy-of-feDropShadow" result="offsetblur"/>
<feFlood flood-color="flood-color-of-feDropShadow" flood-opacity="flood-opacity-of-feDropShadow"/>
<feComposite in2="offsetblur" operator="in"/>
<feMerge>
<feMergeNode/>
<feMergeNode in="in-of-feDropShadow"/>
</feMerge>
Although, in Firefox and Chrome you can use the SVG Filter Effects <feDropShadow> filter or a CSS drop-shadow filter instead.
This is what I think you're looking for. It expands the filter region, keeps the drop shadow unblurred and dials the opacity on the shadow down to 50%. (I've also found browsers to get crotchety when you don't provide explicit dimensions for inline SVG.)
<svg x="0px" y="0px" width="500px" height="300px" style="overflow:visible;" viewBox="0 0 500 300">
<defs>
<marker orient="auto" refY="4" refX="2" markerHeight="13" markerWidth="13" id="_x0000_s1094end">
<path style="fill:yellow; " d="M2,2 L2,6 L6,4 L2,2" />
</marker>
<filter id="f1" x="-50%" y="-100%" width="200%" height="400%">
<feOffset result="offOut" in="SourceAlpha" dx="-8" dy="-8" />
<feComponentTransfer>
<feFuncA type="discrete" tableValues="0 .5"/>
</feComponentTransfer>
<feComposite operator="over" in="SourceGraphic"/>
</filter>
</defs>
<path d="M 288,164 L 108,176" style="stroke-width:8; stroke:yellow; marker-end:url(#_x0000_s1094end); " y="4" x="4" filter="url(#f1)"/>
</svg>