Software:librsvg
Original author(s) | Raph Levien |
---|---|
Developer(s) | GNOME Project |
Written in | C, Rust |
Type | Graphics library |
License | GPLv2, LGPLv2 |
librsvg, (occasionally stylized as LibRsvg)[1] 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-convert 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 representation 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.
Since v2.41.0 many parts have been rewritten in Rust.[3][4]
Adoption
librsvg is developed for the GNOME desktop environment and as such is used by GNOME Files and GNOME Loupe 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.[5] It was once picked for these web applications because it was decidedly "fast but not very accurate", according to MediaWiki.[6] (As of May 2023), Wikipedia and Wikimedia Commons use a version of librsvg 2.44 to render SVG as PNG.[7][8]
Upon switching to the cairo vector rendering engine in 2005,[9][10] librsvg became more accurate and more visually pleasing. Since 2012 an independent developer published Win32 console ports rsvg-convert.exe, (As of December 2017) version 2.40.20.[11] The rsvg-view manual page is also available online.[12]
Version history
Version | Date | Comments |
---|---|---|
1.0.0 | 2001-05-08 | |
1.1.6 | 2002-03-07 | |
2.0.0 | 2002-06-19 | |
2.1.0 | 2002-09-27 | |
2.2.0 | 2003-01-20 | |
2.3.0 | 2003-04-08 | |
2.4.0 | 2003-09-08 | |
2.5.0 | 2003-12-07 | |
2.6.0 | 2004-03-08 | |
2.7.0 | 2004-03-10 | |
2.8.0 | 2004-09-03 | |
2.9.0 | 2005-01-25 | |
2.11.0 | 2005-08-25 | |
2.12.0 | 2005-09-15 | |
2.13.0 | 2005-10-21 | |
2.14.0 | 2006-02-25 | |
2.15.0 | 2006-05-11 | |
2.16.0 | 2006-08-31 | |
2.18.0 | 2007-07-24 | |
2.20.0 | 2008-01-19 | |
2.22.0 | 2008-02-21 | |
2.26.0 | 2009-03-16 | |
2.31.0 | 2010-07-02 | |
2.32.0 | 2010-09-27 | |
2.34.0 | 2011-04-03 | |
2.35.0 | 2011-11-14 | |
2.36.0 | 2012-03-26 | |
2.37.0 | 2013-01-10 | |
2.39.0 | 2013-08-16 | |
2.40.0 | 2013-10-14 | |
2.40.16 | 2016-06-09 | |
2.40.17 | 2017-04-07 | |
2.40.20 | 2017-12-16 | |
2.40.21 | 2020-02-26 | 2.40.21: Last version without Rust |
2.41.0 | 2017-01-04 | |
2.42.0 | 2018-01-09 | |
2.43.0 | 2018-06-12 | |
2.44.0 | 2018-08-23 | |
2.44.10 | 2018-12-11 | 2.44.10: version used on Wikimedia Commons as of May 2023[13] |
2.45.0 | 2018-11-17 | |
2.45.6 | 2019-05-14 | 2:45.6: First version only on Rust.[clarification needed] Requires Cairo 1.16.0 or later and Rust 1.30.0 or later[14] |
2.45.92 | 2019-09-02 | |
2.46.0 | 2019-09-09 | |
2.47.0 | 2019-10-29 | |
2.48.0 | 2020-03-07 | |
2.48.9 | 2020-11-05 | |
2.49.0 | 2020-05-29 | |
2.49.5 | 2020-09-04 | |
2.50.0 | 2020-09-10 | |
2.50.3 | 2021-01-28 | |
2.51.0 | 2021-02-03 | |
2.51.4 | 2021-07-09 | |
2.52.0 | 2021-09-15 | |
2.53.0 | 2022-01-18 | |
2.53.1 | 2022-02-12 | |
2.53.2 | 2022-03-12 | |
2.54.0 | 2022-03-16 | 2.54.1 2022-04-23; 2.54.2 2022-05-13; 2.54.3 2022-05-14; 2.54.4 2022-06-10; 2.54.5 2022-08-26 |
2.55.0 | 2022-08-03 | |
2.55.1 | 2022-09-05 | |
2.55.2 | 2023-03-16 | |
2.57.90 | 2024-01-25 | Latest version as of 2024-01-25
First version to use Rust crates for all image loading operations, eleminating gdk-pixbuf dependency.[15] |
Usage
On Linux with the librsvg2-bin package installed,[16] 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, XML, and valid SVG.
References
- ↑ https://wiki.gnome.org/Projects/LibRsvg
- ↑ "librsvg is a library to render SVG files using cairo". librsvg. GNOME. https://wiki.gnome.org/Projects/LibRsvg.
- ↑ "Librsvg 2.41.0 is released". 2017-01-03. https://mail.gnome.org/archives/desktop-devel-list/2017-January/msg00001.html.
- ↑ Quintero, Federico Mena (2017). Replacing C library code with Rust: What I learned with librsvg. Manchester, UK: GUADEC. https://people.gnome.org/~federico/blog/docs/fmq-porting-c-to-rust.pdf. Retrieved 2018-11-20.
- ↑ Lucideer (April 27, 2009). "Manual:Image Administration - MediaWiki". MediaWiki. https://www.mediawiki.org/wiki/Manual:Image_Administration#SVG.
- ↑ "SVG benchmarks - MediaWiki". MediaWiki. https://www.mediawiki.org/wiki/SVG_benchmarks.
- ↑ "Update librsvg to ≥2.42.3 (2.44.10)". https://phabricator.wikimedia.org/T193352.
- ↑ "librsvg bugs" (in en). https://commons.wikimedia.org/wiki/Librsvg_bugs.
- ↑ Worth, Carl (2 September 2005). "svg shootout". http://article.gmane.org/gmane.comp.lib.cairo/5035. "the librsvg maintainers … have now added cairo support to librsvg. Many thanks are due to Caleb Moore and Dom Lachowicz for this work. The source can be compiled --with-cairo and it builds separate librsvg-2-cairo.so and librsvg-2-base.so libraries"
- ↑ Moore, Caleb (3 November 2005). "using librsvg cairo". http://article.gmane.org/gmane.comp.gnome.lib.librsvg.devel/290. "Librsvg-2.13 cannot link to libart since that backend was majorly broken when we released 2.13 and thus must link to cairo."
- ↑ TumaGonx Zakkum (2012-06-10). "RSVG-Convert SVG image conversion tool". Open Source Software and Windows 32-bit. http://opensourcepack.blogspot.com/2012/06/rsvg-convert-svg-image-conversion-tool.html.
- ↑ Paul Brossier; Dom Lachowicz. "rsvg-view". http://ait08.us.es/cgi-bin/man/man2html?rsvg-view+1.
- ↑ "⚓ T193352 Update librsvg to ≥2.42.3 (2.44.10)". https://phabricator.wikimedia.org/T193352.
- ↑ https://download.gnome.org/sources/librsvg/2.45/librsvg-2.45.6.news
- ↑ https://download.gnome.org/sources/librsvg/2.57/librsvg-2.57.90.news
- ↑ "Debian -- Details of package librsvg2-bin in buster". https://packages.debian.org/buster/librsvg2-bin.
External links
Original source: https://en.wikipedia.org/wiki/Librsvg.
Read more |