librsvg

From Infogalactic: the planetary knowledge core
Jump to: navigation, search
librsvg
Librsvg.svg
Original author(s) Raph Levien
Developer(s) GNOME Project
Stable release 2.40.9[1] (26 March 2015; 9 years ago (2015-03-26)) [±]
Written in C, Rust
Type Graphics library
License GNU LGPL, GNU GPL
Website wiki.gnome.org/Projects/LibRsvg

librsvg is a free software SVG rendering library written as part of the GNOME project, intended to be lightweight and portable.[2] The Linux command-line program rsvg uses the library to turn SVG files into raster images.

Backends

librsvg uses two other libraries to perform tasks from reading the file to rendering to the screen.

  • libxml is used to parse the XML code orientation of an SVG file into a form that can be accessed quickly by the library.
  • cairo is used to render the information obtained by libxml to a block of memory.

Adoption

librsvg is developed for the GNOME desktop environment and as such is used by GNOME Files but is also intended to be used in other software applications. As a notable example, wikis hosted by Wikimedia use librsvg to render SVG images.[3] It was once picked for these web applications because it was decidedly "fast but not very accurate", according to MediaWiki.[4]

Upon switching to the cairo vector rendering engine in 2005,[5][6] librsvg became more accurate and more visually pleasing. Since 2012 an independent developer published Win32 console ports rsvg-convert.exe, as of March 2016 version 2.40.13.[7] The rsvg-view manual page is also available online.[8]

Usage

On Linux, an SVG file can be converted to PNG as follows:

$ rsvg-convert --format=png --output=diagram.png diagram.svg

Other supported output formats include PDF and XML.

References

  1. Lua error in package.lua at line 80: module 'strict' not found.
  2. Lua error in package.lua at line 80: module 'strict' not found.
  3. Lua error in package.lua at line 80: module 'strict' not found.
  4. Lua error in package.lua at line 80: module 'strict' not found.
  5. Lua error in package.lua at line 80: module 'strict' not found.
  6. Lua error in package.lua at line 80: module 'strict' not found.
  7. Lua error in package.lua at line 80: module 'strict' not found.
  8. Lua error in package.lua at line 80: module 'strict' not found.

External links