← 返回
内容创作

Telegram Chat To Image

Convert Telegram chat exports into a long screenshot-style image. Supports Telegram Desktop JSON exports with bubble-style message rendering, avatars, timest...
将 Telegram 聊天记录导出转换为长截图风格图片,支持 Telegram Desktop JSON 导出,包含气泡式消息渲染、头像、时间戳等。
reetyo
内容创作 clawhub v1.2.1 2 版本 100000 Key: 无需
★ 0
Stars
📥 643
下载
💾 28
安装
2
版本
#latest

概述

Telegram Chat to Image

Converts Telegram chat exports into a long screenshot-style image with iOS-style bubble interface.

Changelog

v1.2.0 (2026-03-07)

  • 建议: 长图发送优化 — 对于较长对话,建议打包为 ZIP 文件发送,避免 Telegram 图片压缩导致模糊

v1.1.0 (2026-03-01)

  • 修复: 中文长文本换行问题 — 现在逐字符检查宽度,正确换行
  • 修复: 发件人显示问题 — 正确区分"我"(蓝色气泡)和其他人(灰色气泡+头像)
  • 新增: 显示每条消息的发件人名称

v1.0.0

  • 初始版本

Prerequisites

\\\`bash

pip install Pillow

\\\`

Usage

CLI

\\\`bash

Basic usage

python3 scripts/chat_to_image.py --input result.json --output chat.png

Limit messages

python3 scripts/chat_to_image.py --input result.json --limit 50 --output chat.png

Custom font (for Chinese support)

python3 scripts/chat_to_image.py --input result.json --font /System/Library/Fonts/PingFang.ttc

\\\`

Getting Telegram Export

  1. Open Telegram Desktop
  2. Go to the chat you want to export
  3. Click menu and Export chat history
  4. Select JSON format
  5. Choose messages and export

Input Format

Expects Telegram Desktop JSON export format with messages array containing id, type, date, from, from_id, and text fields.

Output

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

Limitations

  • Images, stickers, and media are not rendered
  • Reply threads are not visually indicated
  • Only plain text messages are fully supported
  • Large exports may create very tall images

Best Practices

Handling Long Conversations

For long conversations that result in tall images (>2000px), consider:

  1. 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.

  1. Message Limits: Use --limit to generate partial exports if the full conversation is too long

Customization

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

版本历史

共 2 个版本

  • v1.2.1 当前
    2026-03-29 23:22 安全 安全
  • v1.1.0
    2026-03-07 02:01

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

content-creation

AdMapix

fly0pants
广告情报与应用数据分析助手,支持搜索广告素材、分析应用排名、下载量、收入及市场洞察,用于广告素材和竞品分析。
★ 295 📥 136,494
content-creation

Baidu Wenku AIPPT

ide-rea
使用百度文库 AI 智能生成 PPT,自动根据内容选择模板。
★ 66 📥 46,208
content-creation

Humanizer

biostartechnology
消除AI写作痕迹,使文本更自然真实。基于维基百科"AI写作特征"指南,识别并修正夸张象征、宣传用语、肤浅-ing分析、模糊归因、破折号滥用、三项排比、AI词汇、负面平行结构及冗长连接词等模式。
★ 860 📥 199,873