I need to convert SVG content to a raster image (preferably a PNG) in a RoR app. Is there a direct method that doesn't involve ImageMagick, or is this the de facto standard?
Generally, ImageMagick is considered the de facto standard. It's been tied into so many languages by now that it shouldn't even be a hassle to use. The ruby binding seems to be called rmagick.
That said, you could of course load and render the SVG yourself, perhaps with the ruby bindings for librsvg (never used that successfully though), and using ruby-libpng to store it as a png.
What's an RoR app though?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With