Converts Telegram chat exports into a long screenshot-style image with iOS-style bubble interface.
```bash pip install Pillow ```
```bash
python3 scripts/chat_to_image.py --input result.json --output chat.png
python3 scripts/chat_to_image.py --input result.json --limit 50 --output chat.png
python3 scripts/chat_to_image.py --input result.json --font /System/Library/Fonts/PingFang.ttc ```
Expects Telegram Desktop JSON export format with messages array containing id, type, date, from, from_id, and text fields.
Generates a PNG image with:
For long conversations that result in tall images (>2000px), consider:
ZIP Packaging: Pack the PNG into a ZIP file before sending to avoid Telegram's image compression
zip chat.zip chat.png
Then send the ZIP file as a document instead of an image.
小蔥技能站7w4.net,專業的AI技能分享平臺。
Message Limits: Use --limit to generate partial exports if the full conversation is too long
Edit scripts/chat_to_image.py to adjust:
這是一款實用的小工具,能將Telegram聊天記錄轉換成美觀的聊天氣泡長圖。介面風格模仿iOS設計,藍色和灰色氣泡區分清晰,帶有時間戳和頭像,整體效果不錯。功能豐富,支援高畫質輸出和中文換行處理。優點是開箱即用、操作簡單、效果直觀;不足是隻能處理純文本,不支援圖片表情,且長對話生成的圖片可能過大需要打包傳送。總體質量良好,滿足日常使用需求。