Telegram inline bot that generates autostereogram (Magic Eye) images with hidden 3D text.
Type @yourbotname hello world in any Telegram chat. Use dots (.) for line breaks:
@yourbotname hello.world
Generates a stereogram with "HELLO" on line 1 and "WORLD" on line 2.
Supports emoji too: @yourbotname hi 😀
- Relax your eyes and look "through" the image
- Or cross your eyes slightly until patterns overlap
- The hidden 3D text will pop out!
Create a .env file:
BOT_TOKEN=your_telegram_bot_token
CACHE_CHANNEL_ID=-100xxxxxxxxxxBOT_TOKEN- Get from @BotFatherCACHE_CHANNEL_ID- Private channel ID where the bot uploads images for caching (bot must be admin)
docker compose up -dRequires Python 3.13+ and uv.
# Install dependencies
uv sync
# Run the bot
uv run python main.pyNote: You need Noto fonts installed locally:
- Fedora:
dnf install google-noto-sans-fonts google-noto-emoji-fonts - Debian/Ubuntu:
apt install fonts-noto-core fonts-noto-color-emoji
- Text is rendered as a depth map (white text on black background)
- SIRDS algorithm generates the stereogram by shifting repeating pattern strips based on depth
- Your brain interprets the horizontal pixel shifts as 3D depth when you defocus your eyes
MIT