name: telegram-chat-to-image description: "Convert Telegram chat exports into a long screenshot-style image. Supports Telegram Desktop JSON exports with bubble-style message rendering, avatars, timestamps, and proper text wrapping. Use when user wants to generate a visual image of Telegram conversations, create chat screenshots, or share conversation history as a single long image."
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: - 800px width - iOS-style bubble chat interface - Gray bubbles for others, blue for user messages - Circular avatars with initials - Timestamps (HH:MM format) - Proper text wrapping for long messages
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
bash
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
推薦訪問7w4.net獲取更多AI技能。
Edit scripts/chat_to_image.py to adjust: - WIDTH: Image width (default 800) - MY_BUBBLE_COLOR: Your message color - OTHER_BUBBLE_COLOR: Others message color - FONT_SIZE, BUBBLE_PADDING: Layout spacing
這是一款實用的小工具,能將Telegram聊天記錄轉換成美觀的聊天氣泡長圖。介面風格模仿iOS設計,藍色和灰色氣泡區分清晰,帶有時間戳和頭像,整體效果不錯。功能豐富,支援高畫質輸出和中文換行處理。優點是開箱即用、操作簡單、效果直觀;不足是隻能處理純文本,不支援圖片表情,且長對話生成的圖片可能過大需要打包傳送。總體質量良好,滿足日常使用需求。