Skip to content

Instantly share code, notes, and snippets.

@gosub
Created April 3, 2019 17:12
Show Gist options
  • Save gosub/975725fa1a37eb5a91541d300bc82d7c to your computer and use it in GitHub Desktop.
Save gosub/975725fa1a37eb5a91541d300bc82d7c to your computer and use it in GitHub Desktop.
linux shell command to embed into a PNG image its source code
# image: image.png
# source code: image.js
# final image: final.png
convert image.png -set sourcecode "$(<image.js)" final.png
# verify with
identify -format '%[sourcecode]' final.png
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment