An image-bending tool that transforms images to sound and back.
Ensure you have uv installed.
git clone https://github.com/meownoid/bender.git
cd bender
uv tool install --reinstall .(Optional) Enable autocompletion by generating a completion script and sourcing it in your shell configuration:
_BENDER_COMPLETE=zsh_source bender > ~/.zshrc.d/bender-complete.zshbender convert image.jpgThis creates image-xxxx.wav and image-xxxx.json files using the default algorithm. The .json file contains metadata for reverse conversion.
Specify the output file name:
bender convert image.jpg -o image.wavWhen converting multiple files or using --n-times, --output must be a directory (it will be created if it does not exist).
Write the metadata JSON to a specific location:
bender convert image.jpg --metadata-out ./metadatabender convert image-xxxx-processed.wavThe corresponding .json file with the longest matching prefix is selected automatically.
Use an explicit metadata file instead of auto-detection:
bender convert image-xxxx-processed.wav --metadata image-xxxx.jsonbender convert --listbender convert -a bmp -p sample_size 1 image.jpgYou can also pass parameters as key=value:
bender convert -a bmp -p sample_size=1 image.jpgbender edit -a split_channels input.jpgWhen multiple images are provided, the editor receives all inputs and produces a single output file.
bender process -a delay input.wavWhen multiple sounds are provided, the processor receives all inputs and produces a single output file.
When experimenting, it might be useful to automatically convert new files as they appear.
bender monitor 'image-*.wav'This command converts new sound files with the prefix image- back to images. Use quotes to prevent shell expansion of the pattern.
