Scalable Vector Graphics
(Redirected from SVG)
Categories: Markup languages | XML-based programming languages | XML-based standards | XML | W3C standards | Graphics file formats | Vector graphics
Scalable Vector Graphics (SVG) is an XML markup language for describing two-dimensional vector graphics, both static and animated. It is an open standard created by the World Wide Web Consortium, which is also responsible for standards like HTML and XHTML.
Contents |
Overview
SVG allows three types of graphic objects:
- vector graphic shapes (e.g. paths consisting of straight lines and curves, and areas bounded by them)
- raster graphics images / digital images
- text
Graphical objects can be grouped, styled, transformed and composited into previously rendered objects. Text can be in any XML namespace suitable to the application, which enhances searchability and accessibility of the SVG graphics. The feature set includes nested transformations, clipping paths, alpha masks, filter effects, template objects and extensibility.
SVG drawings can be dynamic and interactive. The Document Object Model (DOM) for SVG, which includes the full XML DOM, allows straightforward and efficient vector graphics animation via ECMAScript or SMIL. A rich set of event handlers such as onmouseover and onclick can be assigned to any SVG graphical object. Because of its compatibility and leveraging of other Web standards, features like scripting can be done on SVG elements and other XML elements from different namespaces simultaneously within the same web page.
If storage space is an issue, SVG images are sometimes saved with gzip compression, in which case they may be called "SVGZ files". Because XML contains a lot of redundant data, XML tends to compress very well and these files can be much smaller. Often however the original vector-file (SVG) is already smaller than the rasterized version
Mobile profiles
Because of industry demand, two mobile profiles were introduced with SVG 1.1: SVG Tiny (SVGT) and SVG Basic (SVGB). These are subsets of the full SVG standard, mainly intended for user agents with limited capabilities. In particular, SVG Tiny was defined for highly restricted mobile devices such as cellphones, and SVG Basic was defined for higher level mobile devices, such as PDAs.
Neither mobile profile includes support for the full DOM, while only SVG Basic has optional support for scripting, but because they are fully compatible subsets of the full standard most SVG graphics can still be rendered by devices which only support the mobile profiles.
Development history
SVG was developed by the W3C SVG Working Group starting in 1998, after Macromedia and Microsoft introduced Vector Markup Language (VML) whereas Adobe Systems and Sun Microsystems submitted a competing format known as PGML. The Working Group was chaired by Chris Lilley of the W3C.
- SVG 1.0 became a W3C Recommendation on 2001-09-04.
- SVG 1.1 became a W3C Recommendation on 2003-01-14.
- SVG Tiny and SVG Basic (the Mobile SVG Profiles) became W3C Recommendations on 2003-01-14. These are described as profiles of SVG 1.1.
- SVG 1.2 Mobile (Tiny) and SVG 1.2 Full are both currently W3C Working Drafts. SVG 1.2 Mobile was initially released as a profile, and later refactored to be a complete specification, including all needed parts of SVG 1.1 and SVG 1.2. A similarly refactored draft for SVG 1.2 Full has not yet been released.
Support for SVG in browsers and other applications
The use of SVG on the web is in its infancy. There is a great deal of inertia from the long-time use of completely raster formats, but also browser support is patchy, with users of most browsers having to install a plugin. Web sites which serve SVG images typically also provide the images in a raster format, either automatically by HTTP content negotiation or allowing the user to directly choose the file. Alternative images are usually automatically rasterised using a library such as ImageMagick, which provides a quick but incomplete implementation of SVG or Batik, which implements all of SVG, but is slower.
Some wikis have experimented with SVG support; it has been speculated that since SVG is a text-based format, a wiki might allow edits to SVG images in a fashion similar to editing a standard article. However, the benefits of editing images in this way are disputed. It is generally considered that even trivial editing is better achieved using a separate graphics package because it is difficult to visualise exactly how changes to the XML will appear on the final image. Current wikis mostly do not support either the display or editing of SVG images, partly because of the lack of full browser support, but also because rasterization using Batik is CPU-intensive and requires Sun's Java Runtime Environment, which is not free (as in freedom). In the spirit of being open, many wikis refuse to use non-free software; for example Jimbo Wales speaks about this in his weblog [1]. SVG support would be valuable to a wiki, especially for articles that require diagrams, so the situation may change in future, when ImageMagick is expanded to cover more of the SVG standard. Wikipedia currently supports the SVG format.
Plugin support
In some browsers, such as Internet Explorer, a plugin is needed to see SVG images in the browser window. Currently available SVG plugins on the desktop include Adobe SVG Viewer and Corel SVG Viewer (no longer supported).
Native support
There are several advantages to native support. For example there is no need for a plugin, SVG can be mixed with other formats in a single document, and scripting between different document formats is a lot more reliable.
- The Opera web browser (since 8.0 Beta 3) has support for the SVG 1.1 Tiny specification
- The Mozilla Firefox web browser (since 1.5 Beta 1) and the Mozilla SeaMonkey internet suite, which share the same codebase, both have incomplete support for the SVG 1.1 Full specification. An overview of which modules are supported, in progress, and not yet supported can be found on the Mozilla + SVG Status page.
- The Amaya web browser has partial SVG support
- The KDE project's Konqueror web browser has a fairly complete SVG plugin called KSVG. KSVG1 development has ended, but KSVG2 has been active for over a year and is slated to be rolled into KDE 4 core which could make it native rendering for Konqueror some time in the future. Elsewhere in KDE the format is finding greater use, and from version 3.4 onwards SVG wallpapers are supported
- Apple's Safari browser, which was based on the KHTML layout engine of Konqueror but has since forked into the Webkit project has also recently begun to port KSVG2 into WebCore, initiating work on incorporating native support of SVG into Safari
- The Batik SVG Toolkit can be used by Java programs to render, generate, and manipulate SVG graphics
Mobile support
On mobile, the most popular implementations for mobile phones are by Ikivo and Bitflash, while for PDAs, Bitflash and Intesis have implementations. Macromedia Flash Lite by Macromedia optionally supports SVG Tiny since version 1.1. At the SVGOpen 2005 conference, Sun demonstrated a mobile implementation of SVG Tiny 1.1 for the CDLC platform.
Tools
- Most of the major vector graphics editors including Adobe Illustrator and Corel Draw support SVG export and import.
- OpenOffice.org Draw 1.1 and up can export SVG files, for Draw 2.0, there is an additional SVG import plugin.
- Inkscape is an open-source multi-platform vector editor using SVG as its native format. Sodipodi is a predecessor of Inkscape, and is still under development independently.
- Skencil is an open source vector editor with SVG import and export.
- SVGmaker creates SVG from standard Windows programs including the ubiquitous Office suite.
- Sketsa is a proprietary SVG editor.
- Apache Batik is a Java toolkit for applications or applets that want to use images in the SVG format for various purposes, such as viewing, generation or manipulation. Batik supplies a set of standard modules like SVG Parser, SVG Generator and SVG DOM; also includes an SVG viewer application.
- The SVG Scene toolkit enables developers to create application views by constructing an SVG content model, or scene. A scene may be displayed simultaneously in multiple windows, possibly on separate clients. Rendering of the SVG is done via Cairo and Pango, which in turn support diverse targets, e.g. Windows, MacOS, PostScript, Xlib.
- Together, JFreeChart, and Compuware's OptimalJ, use SVG.
See also
- Rich Internet Application
- Semantic Web
- 2D
- 3D computer graphics
- List of vector graphics markup languages
- Comparison of vector graphics markup languages
- Comparison of layout engines (graphics)
- SVG support for the Wikipedia
- SVG images on Wikipedia
External links
- Official
- W3C SVG Pages
- SVG.org - SVG Community Website
- SVG Wiki - Wiki of SVG information for developers
- SVGX
- Demos
- Adobe SVG Demos
- Mozilla SVG Demos
- SVG mapping examples, tutorials and shp2svg converter
- Sample SVG files created from popular programs
- Software
- Inkscape - an open source SVG editor
- Adobe SVG Plugin
- Mozilla SVG
- ksvg SVG renderer for KDE/khtml
- Sketsa - SVG Graphics Editor
- BitFlash - SVGT Player
- Convert files to SVG format
- Libraries
- SVG Salamander - Java SVG player and renderer. (LGPL)
- librsvg SVG renderer for GNOME, and Mozilla/Firebird plugin
- SVG Perl module
- Tutorials
- Articles
- Math Games: Vector vs Raster (maa.org) - A list of 31 SVG editors
- SVG Open, annual international conference on Scalable Vector Graphics
- Article "SVG: A Sure Bet"
- Article "SVG Is The Future"
- Descriptions from Webreference
- Discussion about free implementations
- The future of SVG
- Magical pictures
- SVG clipart
- Open Clip Art Library
- Sodipodi Clipart Page
- GNOME themes extras package
- Crystal Icons
- Gartoon Icons Theme
- BlueSphere Icon Themear:SVG
cs:SVG da:Scalable Vector Graphics de:Scalable Vector Graphics es:Scalable Vector Graphics fr:Scalable Vector Graphics ko:SVG it:Scalable Vector Graphics hu:SVG nl:Scalable Vector Graphics ja:SVG pl:SVG pt:SVG sl:SVG fi:SVG sv:SVG zh:SVG