Hi all,
I was just playing with the Ruby svg-graph library, and it seems to work well.
I was wondering what tools people use to convert svg files into images? Or is there a way to convert the generated file into an image using svg-graph itself? Let's assume my users don't have a plugin to view svg files directly in a web browser.
The main platform is Linux, but Solaris and Windows would be nice, too.
Thanks,
Dan
Daniel Berger wrote:
Hi all,
I was just playing with the Ruby svg-graph library, and it seems to work
well.
I was wondering what tools people use to convert svg files into images?
Or is there a way to convert the generated file into an image using
svg-graph itself? Let's assume my users don't have a plugin to view svg
files directly in a web browser.
You can try convert, from ImageMagick. Basically convert anything to
nearly anything...
Vince
···
--
Vincent Fourmond, PhD student
http://vincent.fourmond.neuf.fr/
Hi,
In <455B2538.9080508@gmail.com>
"Converting SVG files to images" on Wed, 15 Nov 2006 23:33:34 +0900,
···
Daniel Berger <djberg96@gmail.com> wrote:
I was just playing with the Ruby svg-graph library, and it seems to work
well.
I was wondering what tools people use to convert svg files into images?
Or is there a way to convert the generated file into an image using
svg-graph itself? Let's assume my users don't have a plugin to view svg
files directly in a web browser.
CVS Info for project ruby-gnome2
You can generate many file types (PNG, JPEG, GIF and so on)
if you have Ruby/RSVG and Ruby/GdkPixbuf2.
You can also generate PS, PDF, SVG and display your GTK+
widget if you also have rcairo.
Thanks,
--
kou
And then you can install RMagick and control it from Ruby.
Farrel
···
On 15/11/06, Vincent Fourmond <vincent.fourmond@9online.fr> wrote:
Daniel Berger wrote:
> Hi all,
>
> I was just playing with the Ruby svg-graph library, and it seems to work
> well.
>
> I was wondering what tools people use to convert svg files into images?
> Or is there a way to convert the generated file into an image using
> svg-graph itself? Let's assume my users don't have a plugin to view svg
> files directly in a web browser.
You can try convert, from ImageMagick. Basically convert anything to
nearly anything...
Vince
--
Vincent Fourmond, PhD student
http://vincent.fourmond.neuf.fr/
Kouhei Sutou wrote:
Hi,
In <455B2538.9080508@gmail.com>
"Converting SVG files to images" on Wed, 15 Nov 2006 23:33:34 +0900,
> I was just playing with the Ruby svg-graph library, and it seems to work
> well.
>
> I was wondering what tools people use to convert svg files into images?
> Or is there a way to convert the generated file into an image using
> svg-graph itself? Let's assume my users don't have a plugin to view svg
> files directly in a web browser.
CVS Info for project ruby-gnome2
You can generate many file types (PNG, JPEG, GIF and so on)
if you have Ruby/RSVG and Ruby/GdkPixbuf2.
You can also generate PS, PDF, SVG and display your GTK+
widget if you also have rcairo.
Thanks Kou, looks interesting. I couldn't get cairo to build on my
Solaris box, though - I think the configure script is borked. But, as
long as I can convert to png or jpg, all is well. 
Regards,
Dan
···
Daniel Berger <djberg96@gmail.com> wrote:
I have a hunch that Kou's solution will work much better. In the
semi-recent past I tried using ImageMagick for SVG conversion and got
very poor results. I actually ended up using inkscape as a
rendering/conversion tool, which worked for my needs.
pth
···
On 11/15/06, Daniel Berger <djberg96@gmail.com> wrote:
Kouhei Sutou wrote:
> Hi,
>
> In <455B2538.9080508@gmail.com>
> "Converting SVG files to images" on Wed, 15 Nov 2006 23:33:34 +0900,
> Daniel Berger <djberg96@gmail.com> wrote:
>
> > I was just playing with the Ruby svg-graph library, and it seems to work
> > well.
> >
> > I was wondering what tools people use to convert svg files into images?
> > Or is there a way to convert the generated file into an image using
> > svg-graph itself? Let's assume my users don't have a plugin to view svg
> > files directly in a web browser.
>
> CVS Info for project ruby-gnome2
>
> You can generate many file types (PNG, JPEG, GIF and so on)
> if you have Ruby/RSVG and Ruby/GdkPixbuf2.
>
> You can also generate PS, PDF, SVG and display your GTK+
> widget if you also have rcairo.
Thanks Kou, looks interesting. I couldn't get cairo to build on my
Solaris box, though - I think the configure script is borked. But, as
long as I can convert to png or jpg, all is well. 
Regards,
Dan
Patrick Hurley wrote:
<snip>
I have a hunch that Kou's solution will work much better. In the
semi-recent past I tried using ImageMagick for SVG conversion and got
very poor results. I actually ended up using inkscape as a
rendering/conversion tool, which worked for my needs.
pth
Indeed. I've discovered that running 'convert' over the .svg file
gives me a black and white image. I'm not sure why and I haven't a
clue what options I should be passing that might fix this, if any. I
may have to give Inkscape a try.
If you (or anyone else out there) has code samples of converting .svg
files to .png files using Kou's solution, I'd like to see them.
Thanks,
Dan
Indeed. I've discovered that running 'convert' over the .svg file
gives me a black and white image. I'm not sure why and I haven't a
clue what options I should be passing that might fix this, if any. I
may have to give Inkscape a try.
I just shelled out to inkscape and used command line parameters to
save the output to a png. It was fast and did a nice job.
If you (or anyone else out there) has code samples of converting .svg
files to .png files using Kou's solution, I'd like to see them.
I have not tried Kou's suggestion, but was guessing almost anything
would work better than "convert" and also that there was a reasonable
change that gtk shared the svg parse/render with inkscape (but I have
not verified this in any way).
pth
···
On 11/15/06, Daniel Berger <djberg96@gmail.com> wrote: