1
I have an application in Rails and there I generate SVG images to return to the user by email, but I want to return this in another format (png or jpg). Does anyone have any tips on how I can do this?
1
I have an application in Rails and there I generate SVG images to return to the user by email, but I want to return this in another format (png or jpg). Does anyone have any tips on how I can do this?
0
Use the Gem mini_magick https://github.com/minimagick/minimagick
If you use Ubuntu, you need to have imagemagick and librsvg2-bin installed
image = MiniMagick::Image.open("input.svg")
image.format "png"
image.write "output.png"
Thanks Alex , I’ll try here !
Browser other questions tagged ruby-on-rails svg conversion
You are not signed in. Login or sign up in order to post.
I didn’t understand the question, you generate svg and want to convert to another format? That’s it?
– Alex Takitani
That’s right Alex !
– Glauber Renan