Rendering svg file into a jpg format

Dear Friends,

I need to prepare some some logo’s, i have inputs like svg images and
text. I need to read the same and write into a jpg file.

I have an svg image with 600 X 400 size, and a text called “Company Log”

I need to generate a jpg image of size 300X200, which reads the svg
image resize it to 100 X 50 and write this into jpg image. Also i need
to add the text “company logo” in jpg file.

How i should proceed?

I have used rmagick like,

granite ='one.svg')
canvas =
canvas.new_image(300, 200,,50)))
text =
text.font_family = ‘arial’
text.pointsize = 24
text.annotate(canvas, 1,1,1,180, Text) {
self.fill = ‘darkblue’

when using the above code, granite image is displayed thrice as i have
resized it to small and also as texture it is filled throughout the
image. I want display it only once at the right side and at the left
side i need the text.

Could anyone plz suggest on abouve issue

Jose Marin

Could anyone plz suggest on abouve issue

There’s also the mini_magick gem, a wrapper to the “convert” command.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs