resvg icon indicating copy to clipboard operation
resvg copied to clipboard

Strange anomaly's on crispEdges

Open bend-n opened this issue 2 years ago • 12 comments

when rendering svg the result is png

please note the upper right anomaly. It also occurs for other files: svg png again, look at the top right.

I have other examples in which it is not just the top right, but i think this will be sufficient.

these are produced with resvg -w "64" -h "64" --shape-rendering crispEdges "svg_file.svg" "out_file.png"

when not using crispEdges, it does not produce any anomaly's, however it anti aliases the image, which is contrary to my wishes.

bend-n avatar Apr 14 '22 22:04 bend-n

~~Can you provide the file itself?~~ Found.

RazrFalcon avatar Apr 15 '22 08:04 RazrFalcon

any news?

bend-n avatar May 10 '22 07:05 bend-n

Only after the war in my country will end.

RazrFalcon avatar May 10 '22 11:05 RazrFalcon

Okay

bend-n avatar May 12 '22 04:05 bend-n

Only after the war in my country will end.

I hope to end the war soon. Please be sure to protect yourself!

yisibl avatar May 17 '22 13:05 yisibl

Only after the war in my country will end.

Are you and your family safe? 🙏 I've noticed you started programming again

hortiSquash avatar Sep 10 '22 21:09 hortiSquash

@hortiSquash Depends on how you look at it. I live in a city that is shelled by Russians for the past 200 days, everyday. But hey, it could be way worse. At least I'm not on occupied territories, or even dead.

RazrFalcon avatar Sep 11 '22 16:09 RazrFalcon

@RazrFalcon Do you have any idea why this could be happening?

bend-n avatar Oct 22 '22 23:10 bend-n

Probably tiny-skia bug. It would take a while to debug. Assuming this is not Skia bug to begin with.

RazrFalcon avatar Oct 22 '22 23:10 RazrFalcon

Let me check.

bend-n avatar Oct 22 '22 23:10 bend-n

Okay, so I have news.

<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 8.467 8.467">
   <path d="M0 0h8.467v8.467H0z" fill="#6e7080" />
   <path fill="#4a4b53"
      d="M2.117 0H6.35v1.058H2.117zm0 7.408H6.35v1.058H2.117zM0 6.35V2.117h1.058V6.35zm7.408 0V2.117h1.058V6.35z" />
   <path d="M1.058 1.058v.397l.662.662h3.969l.661.661v3.969l.661.661h.397V1.984l-.926-.926z" fill="#989aa4" />
   <path d="M3.175 3.836l.661-.661h.794l.662.661v.794l-.662.662h-.794l-.661-.662z" fill="#989aa4" />
</svg>

Works, with no artifacts (with resvg). Perhaps the svgs need to be de-complexified beforehand?

Seems not to be a skia bug judging from jsfiddle/y5uh7w8f on chrome.

bend-n avatar Oct 22 '22 23:10 bend-n

This is definitely a tiny-skia bug. Not sure when I would have time to dive into debugging. It would probably take a whole day.

RazrFalcon avatar Oct 23 '22 15:10 RazrFalcon