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
Example results
Related Posts
2 Comments + Add Comment
Leave a comment
Recent posts
- UnityHub: Enable built-in Login Dialog (no more browser login/logout issues!)
- Use TikTok-TTS in Unity (with WebRequest)
- Create Scene Thumbnail Image using OnSceneSaved & OnPreviewGUI
- webgl+javascript TTS
- Using Moonsharp (LUA) + Unity Webgl
- Using 3D gameobject prefabs with Unity Tilemap + NavMesh Surface
- Custom Unity Hub Project Template Preview Image/Video (using HTML+CSS in package description)
- Check if point is inside polygon 2D (using line intersection)
- UnityHub: Enable Create Project Button (without having to select Cloud Organization)
- UI: Make Tooltip background fit Text content length
- Pong-Wars in Unity
- Install Android SDK+JDK+NDK for Unity (without AndroidStudio or Unity Hub)
Very interesting, thanks for your work.
spore png image hidden data:
http://www.rouli.net/2008/08/spores-png-format-illustrated.html