ascii-image-to-ascii

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

When to use this skill

何时使用该技能

CRITICAL TRIGGER RULE
  • Use this skill ONLY when the user explicitly mentions the exact skill name:
    ascii-image-to-ascii
    .
Trigger phrases include:
  • "ascii-image-to-ascii"
  • "use ascii-image-to-ascii"
  • "用 ascii-image-to-ascii 把图片转字符画"
  • "使用 ascii-image-to-ascii 生成可读优先/细节优先两版"
核心触发规则
  • 仅当用户明确提及确切技能名称
    ascii-image-to-ascii
    时,才可使用本技能。
触发短语包括:
  • "ascii-image-to-ascii"
  • "use ascii-image-to-ascii"
  • "用 ascii-image-to-ascii 把图片转字符画"
  • "使用 ascii-image-to-ascii 生成可读优先/细节优先两版"

Boundary

边界限制

  • Default output is ASCII-only; ANSI coloring is optional.
  • The bundled script is for local conversion/verification only. Do not fetch/upload images on the user’s behalf.
  • Always give pre-processing advice (crop subject, raise contrast, simplify background) before generating the final ASCII art.
  • 默认输出仅为ASCII格式;ANSI彩色为可选功能。
  • 附带的脚本仅用于本地转换/验证。不得代表用户获取/上传图片。
  • 在生成最终ASCII艺术画之前,务必提供预处理建议(裁剪主体、提高对比度、简化背景)。

How to use this skill

如何使用该技能

Inputs

输入参数

  • imagePath (local path, required)
  • width (default 100; common: 80/100/120)
  • charset (default
     .:-=+*#%@
    , from light to dark)
  • mode (readable | detail; if outputting both, this can be ignored)
  • background (light | dark | unknown, default unknown)
  • colorMode (none | ansi256, default none)
  • imagePath(本地路径,必填)
  • width(默认值100;常用值:80/100/120)
  • charset(默认值
     .:-=+*#%@
    ,从浅色到深色)
  • mode(readable | detail;若同时输出两种版本,可忽略该参数)
  • background(light | dark | unknown,默认值unknown)
  • colorMode(none | ansi256,默认值none)

Outputs (required)

输出结果(必填)

  • asciiReadable: readable-first (less noise, clearer silhouette)
  • asciiDetail: detail-first (more levels, richer texture)
  • paramsGuide: recommended width/charset + pre-processing tips
  • pitfalls: 3-5 common failure modes with fixes
  • asciiReadable:可读优先版本(噪点更少,轮廓更清晰)
  • asciiDetail:细节优先版本(层次更多,纹理更丰富)
  • paramsGuide:推荐的宽度/字符集设置 + 预处理提示
  • pitfalls:3-5种常见失败场景及解决方法

Steps

操作步骤

  1. Pre-processing advice (required):
    • Crop the subject, remove irrelevant background
    • Increase contrast to reduce gradient noise
    • Target width usually 80–120 columns
  2. Charset + mapping direction:
    • Space is the lightest,
      @
      is the darkest (or invert consistently)
  3. Generate two variants:
    • readable: fewer levels (less noise)
    • detail: more levels (more texture)
  4. Optional ANSI:
    • Use color only as a hint; keep the silhouette readable
    • Always provide a no-color fallback
  1. 预处理建议(必填):
    • 裁剪主体,移除无关背景
    • 提高对比度以减少渐变噪点
    • 目标宽度通常为80–120列
  2. 字符集 + 映射方向:
    • 空格是最浅色,
      @
      是最深色(或保持一致反转)
  3. 生成两种版本:
    • 可读版:层次更少(噪点更少)
    • 细节版:层次更多(纹理更丰富)
  4. 可选ANSI彩色:
    • 仅将颜色作为辅助提示;确保轮廓清晰可读
    • 始终提供无彩色的备选方案

Script

脚本

  • scripts/image_to_ascii.py
    • Requires Python + Pillow (
      pip install pillow
      )
    • Supports: readable/detail variants, optional
      --ansi256
  • scripts/image_to_ascii.py
    • 依赖Python + Pillow(执行
      pip install pillow
      安装)
    • 支持:可读/细节两种版本,可选
      --ansi256
      参数

Examples

示例

  • examples/readable-vs-detail.md
  • examples/readable-vs-detail.md

Quality checklist

质量检查清单

  1. Lines are consistent and
    <= width
  2. The readable variant must preserve the main silhouette
  3. No trailing spaces (copy/paste safe)
  1. 每行长度一致且
    <= 设定宽度
  2. 可读版本必须保留主体轮廓
  3. 无尾随空格(支持直接复制粘贴)

Keywords

关键词

English: ascii-image-to-ascii, image to ascii, ascii art, terminal preview, charset, grayscale, dithering, ansi 中文: ascii-image-to-ascii, 图片转字符画, ASCII 字符画, 终端预览, 字符集, 灰度映射, 降噪, ANSI 彩色
英文: ascii-image-to-ascii, image to ascii, ascii art, terminal preview, charset, grayscale, dithering, ansi 中文: ascii-image-to-ascii, 图片转字符画, ASCII 字符画, 终端预览, 字符集, 灰度映射, 降噪, ANSI 彩色