Twinside / Juicy.Pixels

Haskell library to load & save pictures

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

saving a converted svg file throws "divide by zero" error

nek0 opened this issue · comments

Hi there,

When uploading svg files in my image library eidolon, it might throw an "divide by zero" error and abort. I have pinpointed the error so far, that it happens when the converted and scaled svg image is being saved to png. For reference see how I handle converting and saving svgs. The code breaks at line 265.
Here is an example file, which is not working:
sticker-cybergeprueft.svg.zip

Thank you for your time and effort.

Please reduce the test case, I won't digg in your code. I suspect that the division by zero may happen during the svg rendering and not image saving, you can provide a stack trace by compiling with profiling and using --RTS -xc to get it

I have constructed a minimal working example for this bug. It's not a bug in JuicyPixels, but in rasterific-svg. See Twinside/rasterific-svg#4.

Thank you so far.

Ok, I'm closing this one then, handling it in rasterific-svg