3 ms·
This is really interesting, is this (or similar to) steganography? Poked around the repo but haven't yet found where this is implemented (on either end). From
by nkrisc 7y ago
This is really interesting, is this (or similar to) steganography? Poked around the repo but haven't yet found where this is implemented (on either end).
From a user perspective that sounds like a super useful feature, though perhaps unexpected unless you were directly informed of it.
- jgalentine007 7y agoI'm guessing you can just append arbitrary data to a png file since it has eof markers in its file structure.
- Liquid_Fire 7y agoPNG is structured in "chunks" of data of different types, and you can add your own tool-specific types. IIRC there is even a way to indicate what other tools should do with a chunk type they don't recognise (keep it untouched or throw it away).
- jgalentine007 7y agoI exported a draw.io png and they do encode the diagram information with private data chunks.
- alderg 7y agoThe code for writing is here: https://github.com/jgraph/drawio/blob/master/src/main/webapp/js/diagramly/EditorUi.js#L8702 https://github.com/jgraph/drawio/blob/master/src/main/webapp... Reading is here: https://github.com/jgraph/drawio/blob/master/src/main/webapp/js/diagramly/Editor.js#L568 https://github.com/jgraph/drawio/blob/master/src/main/webapp... We're using the tEXt chunk.
- ska 7y agoPNG allows for sidecar data, so you can just encode your "source" there.