Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Embed config in PNG as metadata #39

Open
EmNudge opened this issue Jan 31, 2024 · 4 comments
Open

[Feature Request] Embed config in PNG as metadata #39

EmNudge opened this issue Jan 31, 2024 · 4 comments

Comments

@EmNudge
Copy link

EmNudge commented Jan 31, 2024

One of the main issues with most picture generators for code is that edits to the photo require hand-copying all the code and retrieving a new image, likely with new aesthetics.

We can take the PNG data and append some text chunks containing the current application config or at least the text inside of the image. The page can also be an upload target, so you can drag an image onto chalk.ist that was generated using chalk.ist and retrieve the original text back.

@Idered
Copy link
Owner

Idered commented Jan 31, 2024

I'm working on adding user accounts to let user save their snippets. I guess this will resolve edits issue
CleanShot 2024-01-31 at 11 30 48@2x

@EmNudge
Copy link
Author

EmNudge commented Feb 2, 2024

It would only resolve re-editing for the creator. Usually it's someone else updating old documentation. The PNG specification isn't terribly complicated. I can open up a PR with at least part of this feature if you think it's something you're okay with including.

@Idered
Copy link
Owner

Idered commented Feb 2, 2024

Thanks, this is really interesting feature but let's wait a little bit until I'm done with new version - it will be a massive update. In meantime it would be cool if you could check if modified PNG uploaded to twitter or linked keeps the custom data.

Browser extension which detects such PNG's and adds "Edit on chalk.ist" would be cool

@EmNudge
Copy link
Author

EmNudge commented Feb 4, 2024

Twitter converts all images to Webp these days (significantly smaller than PNG) which strips metadata like text chunks in the process.
Platforms like Discord seem to add on their own EXIF chunk, but preserve the tEXt chunks, so it should carry over there. I assume most of the use will be in docs directly or hosted on github instead of via social media.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants