Re: Can SVG support simple inline image and imagemask data?

Jan Aarsaether wrote:
> 
> "Yardumian, Rick" wrote:
> > I have some simple (16 x 16 x 1 bit) images that I want to use as
> > fill patterns. I'm trying to figure out how to embed, that is, place
> > the image data in an SVG file as opposed to referencing it in a
> > separate file as a PNG or JPEG image.
> 
> I was looking for the same, but I think there is no way of achieving
> this in the current SVG specs.

If they are that small, you could use the 'data' url scheme.

> We have the same capabilities in our (old) proprietory format and I'm
> really missing this in SVG. Given an unique ID, the contained image
> data could be reused from inside or outside the file which takes care
> of the reuse requirement. 

Provided the entire file had already been downloaded. 

> Could any of the experts enlighten us a bit
> why this can/will not be part of SVG? Any chance that something like this
> will be available in the final specs? :->

Well, cache coherency is one and small filesize is another - I'm sure
everyone has seen a small image bloat when saved as eps, so converting
well-compressed image data into hex is not a great idea.

But for tiny images, sure, just use the data url scheme.

In addition, upcoming work on packaging would likely impact SVG in terms
of bundling up an SVG file and any other resources it uses intoa single
archive.
--
Chris

Received on Thursday, 2 December 1999 10:53:32 UTC