3 ms·
I really like that you can export as PNGs and embed the diagram information inside. Being able send around PNGs that everyone can view, but can still be edited
by kelseyr 7y ago
I really like that you can export as PNGs and embed the diagram information inside. Being able send around PNGs that everyone can view, but can still be edited with draw.io makes sharing and updating much simpler.
- nkrisc 7y agoThis 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.