百科.dev
全部条目AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
T

tweetable-polyglot-png

> 编程语言
开源

将多达 3MB 的数据打包成可发推文的 PNG 多语言文件。

2.6K stars0 点赞0 次浏览
访问官网GitHub

工具介绍

将多达 3MB 的数据打包成可发推文的 PNG 多语言文件。

tweetable-polyglot-png

Pack up to 3MB of data into a tweetable PNG polyglot file.

See it in action here: https://twitter.com/David3141593/status/1371974874856587268

Other image hosts I've verified this technique to work on:

  • Imgur (https://i.imgur.com/kNhGrN3.png)

  • Github repo thumbnail/header image (https://repository-images.githubusercontent.com/348501512/06710f00-8886-11eb-95d1-3f416fa3853a)

  • Discord (Not a huge surprise, since they surport arbitrary files anyway) (https://cdn.discordapp.com/attachments/464905259261755392/823171702170845199/06710f00-8886-11eb-95d1-3f416fa3853a.png)

Image hosts I've confirmed it doesn't work on:

  • Reddit (Perhaps it could be made to work by embedding data within the DEFLATE stream, rather than appending?)

How?

Twitter strips unnecessary data from PNG uploads, however, they do not strip trailing data from the DEFLATE stream inside the IDAT chunk, provided that the overall image file meets the requirements to avoid being re-encoded.

Why?

Dunno.

Cover image requirements

The cover image must compress well, such that the compressed filesize is less than (width * height) - size_of_embedded_file. If the cover image does not have a palette, then it must have at least 257 unique colours (otherwise twitter will optimise it to use a palette).

The resolution can be up to 4096x4096, however, be aware that twitter will serve a downscaled version by default, for images greater than 680x680 (depending on your display DPI, etc.).

The image should not have any unecessary metadata chunks. I used these export settings in GIMP:

Embedded file requirements

The total output file size must be less than 3MB (maybe 5MB?), otherwise twitter will convert the PNG to a JPEG.

If the embedded file is a .zip, then the offsets are automatically adjusted so that the overall file is still a valid zip. For any other file formats, you're on your own (many will work without any special handling, notably .pdf, .mp3).

GitHub Issues· 0 开放

在 GitHub 查看全部

暂无开放 Issues,或尚未同步最近议题。

核心特点

  • •Imgur (https://i.imgur.com/kNhGrN3.png)
  • •Github repo thumbnail/header image (https://repository-images.githubusercontent.com/348501512/06710f00-8886-11eb-95d1-3f416fa3853a)
  • •Reddit (Perhaps it could be made to work by embedding data *within* the DEFLATE stream, rather than appending?)

> 标签

Pythonpngpolyglotpolyglot-filessteganography

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言