Re:Draw.io: Online Diagramming Website
by kelseyr on Tuesday November 12, 2019 @09:44AM
(#21514454)
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.
[ Parent
| on HN ]
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.
The code for writing is here: https://github.com/jgraph/drawio/blob/master/src/main/webapp... Reading is here: https://github.com/jgraph/drawio/blob/master/src/main/webapp... We're using the tEXt chunk.
PNG allows for sidecar data, so you can just encode your "source" there.
Re:Draw.io: Online Diagramming Website
by jgalentine007 on Tuesday November 12, 2019 @10:51AM
(#21515008)
I'm guessing you can just append arbitrary data to a png file since it has eof markers in its file structure.
Re:Draw.io: Online Diagramming Website
by Liquid_Fire on Tuesday November 12, 2019 @11:04AM
(#21515123)
PNG 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).
Re:Draw.io: Online Diagramming Website
by jgalentine007 on Tuesday November 12, 2019 @11:16AM
(#21515232)
I exported a draw.io png and they do encode the diagram information with private data chunks.