SVG to GIF export broken since version 7.14.5
See original GitHub issueDescription
I have tried all versions released since 7.14.5 and all result in half-rendering and CPU hogging.
Steps to Reproduce
Run the code below using this example SVG and notice how the text at the bottom is not rendered correctly in any version above 7.14.5.
7.14.5 rendering result: view 7.15.0+ rendering result: view
CPU issues are harder to replicate; I published this code to an Azure Web App and everything works fine for the first N conversions, At a certain point the CPU gets blocked and all requests time out. I ran a dump analysis, results are here for download.
namespace ImageConverter
{
public class Converter
{
private const int RequiredWidth = 1600;
private const int MinDpi = 300;
public static byte[] SvgToGif(Stream svgFileStream)
{
using (var svgToGif = new MagickImage())
{
// read SVG stream
svgToGif.Read(svgFileStream, new MagickReadSettings
{
Font = "arial.ttf",
Format = MagickFormat.Msvg
});
svgToGif.Density = new Density(MinDpi);
svgToGif.Trim();
svgToGif.RePage();
if (svgToGif.Width != RequiredWidth)
{
var resizePercentage = 100 / ((double)svgToGif.Width / RequiredWidth);
svgToGif.Resize(new Percentage(resizePercentage));
}
// convert new specs to GIF
svgToGif.Format = MagickFormat.Gif;
return svgToGif.ToByteArray();
}
}
}
}
System Configuration
- Magick.NET version: > 7.14.5
- Environment (Operating system, version and so on): win-x86 / win-x64
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
The Complete Guide to Converting SVG to GIF with Ease
To convert SVG to GIF, you need to use an SVG to GIF converter or a GIF ... Download the converted file after...
Read more >Image degradation with resize · Issue #18 · dlemstra/Magick.NET
This appears to be a bug in the OpenCL resize code. I will publish a new release this weekend. ... SVG to GIF...
Read more >SVG export broken...can I transfer to another program?
I want to export my work to SVG but now realise that CSP can't export the colours and creates glitches with the linework...
Read more >Convert SVG Animation to GIF - YouTube
In this short video Chris shows his process of capturing SVG animations and converting them to GIFs using GreenSock for the animation, ...
Read more >SVG export is broken in Illustrator 2018 - how can...
I have sucessfully edited and exported SVG files with these versions previously. However, now these versions show the same bugs, it looks like ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
A new release that includes a fix for your issue has been published (17.0.0.1). Can you test if you are still experiencing the CPU issue with that new release?
Deployed the latest version on Monday, been running good!