W3C home > Mailing lists > Public > www-svg@w3.org > August 2000

Re: images

From: Jon Ferraiolo <jferraio@Adobe.COM>
Date: Fri, 04 Aug 2000 08:43:48 -0700
Message-Id: <200008041540.IAA01043@mail-345.corp.Adobe.COM>
To: "RobertoBe" <RobertoBe.software@teseo.com>
Cc: www-svg@w3.org
You can embed images (or fonts or whatever) inline into an SVG by using the
"data" URL scheme, which documented at ftp://www.ietf.org/rfc/rfc2397.txt

The "data" URL scheme is required for Conforming SVG Viewers (see
http://www.w3.org/TR/SVG/conform.html#ConformingSVGViewers). Adobe supports
this scheme today, both as an option when exporting SVG files from Adobe
Illustrator 9 and in the Adobe SVG Viewer. I don't know about other SVG
generators or viewers.

The spec for the "data" URL scheme states that this is meant only for small
images. People should indeed avoid abusing the "data" URL scheme with large
files; nevertheless,  my understanding is that Adobe's software has no
problem with arbitrarily large files packaged using the "data" URL scheme
because it is so compellingly convenient to have all information stored
within a single file.

Here is an example of something I exported from Adobe Illustrator 9. The
original file contained only a single raster image which is a checkerboard
of red, green and blue squares. I am pretty sure that the embedded raster
file is a PNG. Anyway, here is the sample SVG file to show you what the
"data" URL scheme looks like in an SVG file:

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20000303 Stylable//EN"
<!-- Generator: Adobe Illustrator 9.0, SVG Export Plug-In  -->
<svg  width="9pt" height="9pt" viewBox="0 0 9 9" xml:space="preserve">
	<g id="Layer_x0020_1"
		<image width="9" height="9"

Jon Ferraiolo
SVG Editor
Adobe Systems Incorporated

At 03:07 PM 8/4/00 +0200, you wrote:
>in svg specifications I didn't find a way to embed an image in a svg
>file. Do I miss some information or image entity always point to an
>external file? I think it could be useful to have only one file rather
>than one svg and several jpg or png...
>Waiting to hear from you soon, regards
>Roberto Beltrami
>WANAX srl, Fermo (AP), Italy
>Tel: +39 0734 628818    Fax +39 0734 628816
>WWW: http://www.teseo.com    Email:  software@teseo.com
Received on Friday, 4 August 2000 11:44:01 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 March 2017 09:46:49 UTC