Image::LibRSVG is a Perl module that provides an Perl-Interface towards the gnome-lib librsvg-2 which is able to convert SVG(Scaleable Vector Graphics) into bitmapformats like (PNG,JPG,...). To which formats you can convert the svg-files depends on your gdk-pixbuf configuration. Still at least PNG and JPG should be available.
SYNOPSIS
use Image::LibRSVG;
## static Methods
my $known_formats = Image::LibRSVG->getKnownFormats();
my $formats = Image::LibRSVG->getSupportedFormats();
my $isSupported = Image::LibRSVG->isFormatSupported("tiff");
my $rsvg = new Image::LibRSVG();
$rsvg->convert("my.svg", "my.png" );
$rsvg->convertAtZoom("my.svg", "my.png", 1.5, 1.5 );
$rsvg->convertAtMaxSize("my.svg", "my.png", 200, 300 );
$rsvg->convertAtSize("my.svg", "my.png", 200, 300 );
$rsvg->convertAtZoomWithMax("my.svg", "my.png", 1.5, 1.5, 200, 300 );
$formats = $rsvg->getSupportedFormats();
$isSupported = $rsvg->isFormatSupported("tiff");
$rsvg->loadImage( "my.svg" );
open( SVGFILE, "< my.svg" );
local( $/ ) ;
$rsvg->loadImageFromString( < SVGFILE > );
close SVGFILE;
$rsvg->saveAs( "my.png" );
$rsvg->saveAs( "my.jpg", "jpeg" );
$rsvg->loadImage( "my.svg", 0, { zoom => [ 1.5, 1.5 ] } );
$rsvg->saveAs( "zoomed.png" );
my $bitmap = $rsvg->getImageBitmap();
Product's homepage
Requirements:
· Perl