You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Another item I have been thinking about is the possibility of
including the input string's value as metadata in the image file. It
may be advantageous to include this as a tEXt or iTXt chunk with a
"comment" key in a PNG, or a <desc>...</desc> or <title>...</title>
pair in an SVG.
While I like this suggestion, the implementation seems to be not simple:
How to embed binary (8-bit) data?
Embedding text data to SVG/EPS may require sanitizing.
Your comments are welcome.
The text was updated successfully, but these errors were encountered:
This is something I have been thinking about as well, although my initial plan was to add the original text as comment (in SVG as well). Using a title tag would definitely make more sense though.
For SVG, one could resort to plopping the thing in a CDATA: the only care that needs to be taken then is that the (unlikely) sequence ]]> must be split across two CDATA sections, which is very easy to do. The only thing that should be ensured is that the character encoding of the XML is set correctly (so, shift_jis or iso-8859-1 as appropriate).
For EPS, the text would need to go in some comment, so the only escaping that would be needed is that of newlines, probably, although I' d have to refresh my knowledge of EPS and the DSC to be sure about that.
For PNG with arbitrary data, one could encode the thing with base64 before stuffing it in a text chunk if it contains anything that is not a printable latin1 character.
I'll see if I can cook up something for the SVG part. EDIT: I've started working on the feature in my embed-intext branch.
David Dahl suggests:
While I like this suggestion, the implementation seems to be not simple:
Your comments are welcome.
The text was updated successfully, but these errors were encountered: