RE: [PEAR-DEV] image2svg - A class converting Images to standalone SVG
| From: | Urs Gehrig | Date: | Tue, 30 Apr 2002 11:29:16 +0000 |
| Subject: | RE: [PEAR-DEV] image2svg - A class converting Images to standalone SVG | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-5918@lists.php.net to get a copy of this message | ||
dear brent
> I tried this out, and while it seems to work (well, it generated
> something; I didn't get around to getting a SVG browser to view it with),
> could you explain why someone would want to convert a bitmap into this
> format?
well, there are to ways of argumentation:
1) formalistic:
SVG specs - e.g. [1] - follow a normative reference [2], called a
"data" URL scheme, which allows direct implementation of media
data of the form:
data:[<mediatype>][;base64],<data>
so basically, it is intended to include such data into svg. this should work
with html as well.
2) pragmatic:
e.g. there is a recent draft of SVG for mobile apps [3], where - as
far as i know - you do not have a filesystem to link for images. so you
could
include that media directly. that is just one practical approach of my
class.
it is meant to convert images, that you do not have in any other format, to
include into a SVG design.
> the code, the SVG is 30% larger than the source image, it seems to only
> have drawbacks.
mfischer: "The possibility of embedding binary images is making use of
effects like blending and shading with SVG"
> Code's nice though!
;)
[1] http://www.w3.org/TR/SVG/refs.html#ref-RFC2397
[2] http://www.ietf.org/rfc/rfc2397.txt
[3] http://www.w3.org/TR/SVGMobile/, watch for
"References and the 'defs'
Element"
-urs