Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SVG rendering issue when using filter #1324

Closed
Mizux opened this issue Jan 29, 2020 · 2 comments
Closed

SVG rendering issue when using filter #1324

Mizux opened this issue Jan 29, 2020 · 2 comments
Labels

Comments

@Mizux
Copy link

Mizux commented Jan 29, 2020

Summary

I have an issue when trying to render a svg file containing some filter in my README.md

Setup

My src/stone.svg and point to it using ![img](src/stone.svg) in a README.md:

<svg
  width="256"
  height="256"
  xmlns="http://www.w3.org/2000/svg"
  xmlns:xlink="http://www.w3.org/1999/xlink"
  version="1.1">
<defs>
  <filter id="grain" y="0%" x="0%" height="100%" width="100%">
    <feTurbulence type="fractalNoise" seed="8" numOctaves="4" baseFrequency="0.064" result="noise"/>
    <feDiffuseLighting surfaceScale="2" lighting-color="white" in="noise" result="diffLight">
      <feDistantLight elevation="33" azimuth="45"/>
    </feDiffuseLighting>
    <feComposite operator="in" in2="SourceGraphic" result="result3" />
    <feBlend mode="multiply" in="result3" in2="SourceGraphic" result="result2"/>
  </filter>
</defs>
<rect
  fill="#552200" filter="url(#grain)"
  x="0" y="0" width="256" height="256" />

<path
  style="fill:#008000;stroke:none;stroke-width:5;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke fill markers;filter:url(#grain)"
  d="M 0,0 V 64 c 100.271869,66.093035 194.245559,38.983922 256,0 V 0 z"
  />
</svg>

Observed

I got a wrong rendering when using ![img](src/stone.svg):
wrong

Workaround

I got the correct rendering when using ![stone](https://rawgit.luolix.top/Mizux/svg/master/src/stone.svg)
correct

note: the svg is correctly rendered here also: https://github.com/Mizux/svg/blob/master/src/stone.svg
maybe related to:

Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the Stale label Nov 15, 2024
@Mizux
Copy link
Author

Mizux commented Nov 15, 2024

seems fixed !

@Mizux Mizux closed this as completed Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant