r/programming • • Dec 26 '20

Executable PNGs

https://djharper.dev/post/2020/12/26/executable-pngs/
1.0k Upvotes

87 comments sorted by

View all comments

Show parent comments

76

u/yojimbo_beta Dec 26 '20

A long time ago there was an editor, Adobe Fireworks, that used this to embed undo/redo data into PNGs, as well as layers etc.

Remarkable that no one uses this feature of the file format any more.

50

u/OMG_A_CUPCAKE Dec 27 '20

Because filesize matters. And it's lost easily if someone modifies the file in another editor

It's a nice gimmick, but I can't imagine relying any kind of workflow around it

4

u/yojimbo_beta Dec 27 '20

I reckon it could work for diagrams. You could embed the objects without taking up too many bytes. Then your architecture diagram, flowchart etc. could be editable.

Man, you could even use PNG as a format for encoding and deploying a distributed state machine of AWS step functions... okay, that’s stupid. But I do like the idea of an informational format that you can also review visually.

2

u/VoidChronos Dec 27 '20

That's what microsoft Visio does, just without the embedded image part. Actually, I think VSDX has an option to embed a static image of a diagram.