On Jan 24, 2014, at 9:45 AM, Krzysztof KosiĆski wrote:
2014/1/24 Martin Owens <doctormo@...400...>:
> He devs,
>
> I've been trying to read up on image tags special case, where a href
> will start with data: and then proceed to have data. Since I want to
> merge most of the sp-image logic into Inkscape::URI I need to know if
> data uris are something the svg spec says should only be available to
> image tags... or should be available to any href.
Our end goal here should be to decode the binary data in the data URI
when the XML document is parsed, so that we don't end up redundantly
storing both the binary and its base64-encoded form, as is the case at
present. Naturally this requires some support in the XML tree.
Including image-related code in the Inkscape::URI class is not a good
idea; data URI decoding, yes; image handling, no. The data URI can
contain arbitrary files, not just images.
> The svg 1.1 spec says nothing about data uris that I could find. Any
> ideas?
Theoretically, a data URI is just like any other URI, and should be
able to appear anywhere where a normal URI would be accepted. However,
I'm not sure how the browser support looks on that front.
Martin,
I just wanted to highlight that Krzysztof is spot-on with all this detail. we can look at
a few other things as we go, but keeping this end goal in mind will really help us in the
little choices as you implement the initial/immediate steps.