Skip to content

Fix OutOfMemoryException#32

Closed
fabianfoos wants to merge 1 commit into
arklumpus:masterfrom
fabianfoos:master
Closed

Fix OutOfMemoryException#32
fabianfoos wants to merge 1 commit into
arklumpus:masterfrom
fabianfoos:master

Conversation

@fabianfoos

Copy link
Copy Markdown

Fix OutOfMemoryException when importing SVG with text with stroke-width=0 and then rasterize it with ImageSharp.

@arklumpus

Copy link
Copy Markdown
Owner

Hi, thank you for noticing this! I have investigated a bit, and I believe that this is actually a bug in ImageSharp (there is a call to an ImageSharp method that hangs and allocates large amounts of memory).

I have created a bug report there (SixLabors/ImageSharp.Drawing#224), and hopefully they will look into it.

In the meantime, the best way to implement a workaround in VectSharp would be within VectSharp.Raster.ImageSharp, rather than in VectSharp.SVG (you don't need an SVG file to reproduce the issue, even just stroking a rectangle with a line thickness of 0 will reproduce the bug).

I have a simple fix for this (as you can imagine, it's just a single line of code), however I have just started a new job, and I am still waiting to be formally authorised to release my code as open-source... Hopefully this won't take too long and I can release an updated version of VectSharp.Raster.ImageSharp soon.

@fabianfoos

Copy link
Copy Markdown
Author

Hi, many thanks for reviewing the issue!
Good luck with your new job!
Best regards!

@arklumpus

Copy link
Copy Markdown
Owner

This should be fixed in VectSharp.Raster.ImageSharp 1.1.3-beta14.16!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants