🔍

首页Home › 图片工具Image Tools

🔢 图片转 01 字符画(二进制文字艺术)Convert Image to Binary Art (0/1 Text Art)

把图片转换成由 0 和 1(或 █、#、自定义字符)组成的文字画:可设置宽度(每行字符数)、自动阈值(Otsu 算法)或手动阈值、抖动、反转明暗,输出可直接复制或下载为 .txt。行数会按字符的高宽比自动压缩,保持图片比例不变形。适合做黑客风头像、代码注释彩蛋和终端 Banner,图片只在浏览器本地处理。Turn a picture into text art made of 0s and 1s (or █ blocks, # marks or your own two characters). Set the width in characters, use an automatic (Otsu) or manual threshold, add dithering or invert, then copy the result or download it as .txt. The row count is squashed to suit the shape of text characters, so the picture keeps its proportions. Fun for hacker-style avatars, code-comment Easter eggs and terminal banners. Images are processed locally in your browser.

点击选择或拖放图片Click or drop an image here

使用说明与常见问题How-to & FAQ

「图片转 01 字符画(二进制文字艺术)」是什么?What is the Convert Image to Binary Art (0/1 Text Art) tool?

把图片转换成由 0 和 1(或 █、#、自定义字符)组成的文字画:可设置宽度(每行字符数)、自动阈值(Otsu 算法)或手动阈值、抖动、反转明暗,输出可直接复制或下载为 .txt。行数会按字符的高宽比自动压缩,保持图片比例不变形。适合做黑客风头像、代码注释彩蛋和终端 Banner,图片只在浏览器本地处理。Turn a picture into text art made of 0s and 1s (or █ blocks, # marks or your own two characters). Set the width in characters, use an automatic (Otsu) or manual threshold, add dithering or invert, then copy the result or download it as .txt. The row count is squashed to suit the shape of text characters, so the picture keeps its proportions. Fun for hacker-style avatars, code-comment Easter eggs and terminal banners. Images are processed locally in your browser.

如何使用「图片转 01 字符画(二进制文字艺术)」?How do I use the Convert Image to Binary Art (0/1 Text Art) tool?

在「图片转 01 字符画(二进制文字艺术)」中,选择或拖入文件,按需设置「宽度(字符数)」、「字符」、「深色 + 浅色字符」、「阈值」、「显示字号」等选项,然后点击「复制文字」、「下载 .txt」按钮即可。In the Convert Image to Binary Art (0/1 Text Art): Choose or drop your files, set "Width (characters)", "Characters", "Dark + light characters", "Threshold", "Display size", then click "Copy text", "Download .txt".

自动阈值和手动阈值有什么区别?What's the difference between automatic and manual threshold?

每个位置先算出亮度(0–255),比阈值暗的写成“深色”字符,否则写成“浅色”字符。自动阈值使用 Otsu 算法,按图片的亮度分布找出最能分开前景和背景的分界,大多数照片和图标都适用;画面整体偏亮或偏暗、主体不清楚时,取消“自动阈值”后拖动滑块手动调整。Each position gets a brightness from 0 to 255. Anything darker than the threshold becomes the dark character; the rest becomes the light one. The automatic threshold uses Otsu's method, which picks the cut that best separates foreground from background based on the image's brightness spread, and suits most photos and icons. If the picture is very bright or dark overall or the subject gets lost, untick Automatic threshold and drag the slider.

为什么行数比宽度少?Why are there fewer rows than columns?

文字字符的高度大约是宽度的两倍,所以行数按“宽度 × 图片高宽比 × 0.5”计算,在等宽字体里显示时图片比例才不会被拉长。例如 80 个字符宽的正方形图片会输出 40 行。Text characters are roughly twice as tall as they are wide, so the row count is width × the image's height/width × 0.5. That way the picture keeps its proportions in a monospace font. A square image at 80 characters wide gives 40 rows.

“抖动”有什么用?What does dithering do?

只有两种字符时,普通转换会把灰色区域全部变成同一种字符,丢掉明暗层次。勾选抖动后(Floyd–Steinberg 误差扩散),灰色会用两种字符按比例交错表示,越暗“深色”字符越多,能表现渐变和照片细节;线条图、Logo 不勾选更干净。With only two characters, a plain conversion turns every grey area into one character and loses the shading. With dithering on (Floyd–Steinberg error diffusion), greys are drawn by mixing the two characters in proportion, with more dark characters in darker areas, so gradients and photo detail show through. Leave it off for line art and logos for a cleaner look.

怎样显示效果最好?会上传吗?How do I get the best display? Is anything uploaded?

把结果粘贴到使用等宽字体的地方(代码编辑器、终端、Markdown 代码块),并关闭自动换行;行宽超过窗口时会被折行打乱。透明部分按白色背景处理。图片只在浏览器本地处理,不会上传。Paste the result somewhere that uses a monospace font (a code editor, a terminal, or a Markdown code block) and turn off word wrap, because lines wider than the window get broken up. Transparent areas are treated as a white background. Images are processed locally in your browser and never uploaded.

有哪些选项可以调整?What options can I adjust?

「图片转 01 字符画(二进制文字艺术)」的设置:「宽度(字符数)」默认 80,范围 4–400;「字符」可选 1 = 深色、0 = 浅色、0 = 深色、1 = 浅色、█ 方块、# 和 .、自定义(默认 1 = 深色、0 = 浅色);「深色 + 浅色字符」默认 @;「阈值」默认 128,范围 1–255;「显示字号」默认 8,范围 4–16;可勾选:「自动阈值」(默认勾选)、「抖动(表现灰度)」、「反转明暗」;可选文件:常见图片格式(含 HEIC、HEIF、AVIF、WEBP、BMP、JFIF)。改动任一选项后结果会按新设置重新生成。Settings in the Convert Image to Binary Art (0/1 Text Art) — "Width (characters)" default 80, range 4–400; "Characters": 1 = dark, 0 = light, 0 = dark, 1 = light, █ blocks, # and ., Custom (default 1 = dark, 0 = light); "Dark + light characters" default @; "Threshold" default 128, range 1–255; "Display size" default 8, range 4–16; tick boxes: "Automatic threshold" (on by default), "Dither (show grey tones)", "Invert"; files: common image formats (including HEIC, HEIF, AVIF, WEBP, BMP, JFIF). Changing any option…

「图片转 01 字符画(二进制文字艺术)」免费吗?需要注册吗?Is the Convert Image to Binary Art (0/1 Text Art) free? Do I need an account?

「图片转 01 字符画(二进制文字艺术)」完全免费,无需注册或安装,打开网页即可使用,手机和电脑都能用;输入的内容只在你的浏览器本地处理。The Convert Image to Binary Art (0/1 Text Art) is completely free with no sign-up or install and works on phones and desktops; what you enter is processed only in your browser.

相关工具Related tools

🔍 检查图片是不是 PNG(文件格式、损坏、APNG 检测)Check If Image Is PNG (Format, Corruption & APNG Check)🎨 图片取色器(查看像素 RGB / HEX / HSL 颜色值)Show RGB Image Colors (Pixel Colour Picker)🔲 检查图片是否透明(透明像素、Alpha 通道检测)Check Image Transparency (Alpha Channel & Transparent Pixels)👤 图片剪影生成(把主体变成纯色轮廓)Create Silhouette from Image🌀 图片扭曲(漩涡 / 旋转扭曲效果)Twist Image Pixels (Swirl Effect)📶 像素排序(Pixel Sorting 故障艺术)Sort Pixels in Image (Pixel Sorting Glitch Art)🧩 打乱图片像素(随机混淆,可用种子还原)Mix Pixels in Image (Scramble & Unscramble)🧮 查看图片字节(十六进制 Hex 查看器)Print Image Bytes (Hex Viewer)🧱 字节转图片(Hex / Base64 / 原始像素还原图片)Create Image from Bytes (Hex, Base64, Raw Pixels)🔣 图片转 RGB 数值(导出每个像素的颜色值)Convert Image to RGB Values🖌️ RGB 数值转图片(把颜色值画成像素图)Convert RGB Values to Image👾 文字转像素字(像素风文字图片)Convert Text to Pixel Art

← 全部工具All tools