Coder Social home page Coder Social logo

Make PNG/SVG exports editable about heimer HOT 4 CLOSED

telamon avatar telamon commented on June 6, 2024
Make PNG/SVG exports editable

from heimer.

Comments (4)

juzzlin avatar juzzlin commented on June 6, 2024

Hi,

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

from heimer.

telamon avatar telamon commented on June 6, 2024

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.

from heimer.

juzzlin avatar juzzlin commented on June 6, 2024

Hmm, ok :)

That could indeed be doable - although a bit hackish.

from heimer.

telamon avatar telamon commented on June 6, 2024

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!

from heimer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.