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:
7w4.net有更好的技能插件。
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.
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设计,蓝色和灰色气泡区分清晰,带有时间戳和头像,整体效果不错。功能丰富,支持高清输出和中文换行处理。优点是开箱即用、操作简单、效果直观;不足是只能处理纯文本,不支持图片表情,且长对话生成的图片可能过大需要打包发送。总体质量良好,满足日常使用需求。