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

MIT-0 · Free to use, modify, and redistribute. No attribution required.
0 · 256 · 0 current installs · 0 all-time installs
MIT-0
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
Name/description match the code and SKILL.md: the script reads Telegram Desktop JSON and renders a long chat image. No unrelated binaries, cloud services, or credentials are requested.
Instruction Scope
SKILL.md instructs CLI usage (pip install Pillow, run the script with --input/--output) and describes expected input/output. The instructions do not ask the agent to read unrelated files, access environment secrets, or transmit data externally.
Install Mechanism
No install spec is provided (instruction-only), so nothing is written to disk by an automated installer. The only runtime dependency is the well-known Pillow package installed via pip as documented.
Credentials
The skill declares no environment variables, credentials, or config paths. The code uses local filesystem (reading JSON export, optional font files) which is appropriate for the task.
Persistence & Privilege
always is false and the skill does not request persistent system presence or modify other skills. It performs one-off local rendering and writes only the output image (and optionally a ZIP if user follows recommendations).
Assessment
This skill appears coherent and performs only local processing of a Telegram JSON export into a PNG. Before running: (1) review the included script yourself since the source is 'unknown'; (2) be mindful of very large exports — rendering extremely tall images can consume a lot of memory/CPU; (3) the only dependency is Pillow (pip install Pillow); (4) the script reads files from disk and writes the image output — it does not appear to perform network I/O or access secrets, but if you plan to share outputs, ensure they don't contain private data. If you need stronger assurance, run it in a sandboxed environment or inspect the complete script file that will be executed.

Like a lobster shell, security has layers — review code before you run it.

Current versionv1.2.1
Download zip
latestvk972700e95sn27ajjejgwhtabn82dfz5

License

MIT-0
Free to use, modify, and redistribute. No attribution required.

SKILL.md

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

    zip chat.zip chat.png
    

    Then send the ZIP file as a document instead of an image.

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

Files

2 total
Select a file
Select a file to preview.

Comments

Loading comments…