juzzlin / Heimer

Heimer is a simple cross-platform mind map, diagram, and note-taking tool written in Qt.
GNU General Public License v3.0
887 stars 112 forks source link

Make PNG/SVG exports editable #233

Closed telamon closed 1 year ago

telamon commented 1 year ago

Hello! It would be really cool if I could re-open SVG/PNG files exported in heimer and continue editing them.

Main usecase is that in order to share an idea I have to export to a general readable format. But then i have to maintain a separate .alz copy.

Thanks =)

juzzlin commented 1 year ago

Hi,

I understand your need, but unfortunately it's not possible to convert SVG/PNG back to Heimer's internal data model :(

telamon commented 1 year ago

I was thinking more along the lines of appending a copy of the internal data-format to the end of the PNG stream.

AFAIK png-decoders ignore any additional bytes after the image data

cat exported.png original.alz > combined.png

The combined.png should practically work like a regular image but it gives the option to "import" it back into heimer. Either by jumping through the chunks or just skipping all bytes until the IEND marker; https://en.wikipedia.org/wiki/PNG#Examples Then assume that any additional bytes are alz-format.

As for SVG; It's xml, introducing a custom tag like <alz>base64-encoded-heimer-graph</alz> can be done but that would require additional steps parsing XML. :/

I don't know.

Point is, I really like your software, creativity thrives in simplicity and limitation; IMHO: The more devices that your custom data-format reaches (even if it's embedded) the higher the chance that more people will download the editor.

juzzlin commented 1 year ago

Hmm, ok :)

That could indeed be doable - although a bit hackish.

telamon commented 1 year ago

I think it's the same technique used today by https://draw.io and https://www.lexaloffle.com/pico-8.php A long time ago I used it myself in a couple of projects to prepend cross-os-folder thumbnails/previews.

The tradeoff is that filemagic reports image/png for such files shrug

Um. If this feature is part of the roadmap, would you mind reopen? Cheers!