I have an application in rails and there I generate SVG images to return to the user via email, but I want to return this in another format (png or jpg). Does anyone have any tips on how I can do this?
I have an application in rails and there I generate SVG images to return to the user via email, but I want to return this in another format (png or jpg). Does anyone have any tips on how I can do this?
Use gem mini_magick link
If you use Ubuntu, you need to have the imagemagick and librsvg2-bin installed
image = MiniMagick::Image.open("input.svg")
image.format "png"
image.write "output.png"