15
2020
Encode/Decode Audio To/From PNG Alpha Channel
Small test on embedding Audio data into PNG alpha channel.
With added option to shuffle pixels to hide/”encrypt” original image and sound.
To make sound file small enough, use this option to set low hz.
Ideas for later:
– Compress audio (tested RLE but didn’t do much with audio)
– Use full texture size automatically (currently just fills as long as have data)
– Resample audio in script, instead setting sample rate in audio importer
– Option to encode seed and/or hz value into texture
Sources: (take both scripts)
https://gist.github.com/unitycoder/6fece768157c038fb4c28d4b59931625

(note the alpha channel values starting from bottom)

(seed=123 and samplerate=1000 if you want to decode)
Example results
Related Posts
2 Comments + Add Comment
Leave a comment
Recent posts
- Editor Tool: Scene Size Analyzer
- LudumDare 60: Old Tech
- uBasic Scripting Language for Unity
- GreaseMonkey+Editor Plugin: 1-Click Copy script from ChatGPT (Web) to Unity Editor (as script)
- Editor Tool: Property Watcher
- .unityignore : Hide files from Project window
- PostBuild Script to Create Single exe Standalone File
- Game Loop Designer
- Favorites in PackageManager
- LudumDare59 : Signal
- Unity Editor: Tree Generator
- Leaf/Foliage Generator Tools (Runs in Browser)
Recent Comments
Coin:
CUgDSbRqFcAumDSAcdKDvuXsw26VdkJe8C8WGUQHBAGS
An article by












Very interesting, thanks for your work.
spore png image hidden data:
http://www.rouli.net/2008/08/spores-png-format-illustrated.html