linux - 如何将cacaview的结果输出到文件中?
问题描述
我知道如何使用 cacaview 查看图像文件。我想将结果保存在文本文件中。这可能吗?
解决方案
你不能使用 cacaview,你必须使用 libcacaimg2txt
的一部分,试试这样:
img2txt -W 80 -f ansi ./image.png > image.txt
有关更多信息,请查看帮助:
img2txt -h
输出:
-h, --help This help
-v, --version Version of the program
-W, --width=WIDTH Width of resulting image
-H, --height=HEIGHT Height of resulting image
-x, --font-width=WIDTH Width of output font
-y, --font-height=HEIGHT Height of output font
-b, --brightness=BRIGHTNESS Brightness of resulting image
-c, --contrast=CONTRAST Contrast of resulting image
-g, --gamma=GAMMA Gamma of resulting image
-d, --dither=DITHER Dithering algorithm to use :
none: no dithering
ordered2: 2x2 ordered dithering
ordered4: 4x4 ordered dithering
ordered8: 8x8 ordered dithering
random: random dithering
fstein: Floyd-Steinberg dithering
-f, --format=FORMAT Format of the resulting image :
caca: native libcaca format
ansi: ANSI
utf8: UTF-8 with ANSI escape codes
utf8cr: UTF-8 with ANSI escape codes and MS-DOS \r
html: HTML
html3: backwards-compatible HTML
bbfr: BBCode (French)
irc: IRC with mIRC colours
ps: PostScript document
svg: SVG vector image
tga: TGA image
troff: troff source
推荐阅读
- android - 将图像添加到默认的 android 应用操作栏
- asp.net-mvc-4 - MVC4 Razor 在单个视图上访问多个模型类在各种元素上给出错误
- django - 在有和没有时区的 Django 中处理多个数据库
- html - 跨元素的舍入固定表格布局单元格宽度百分比计算
- python - NumPy 在二维数组中逐行搜索一维数组
- docusignapi - 是否有 eSignature REST API 中可用的所有 XSD 请求/响应的列表?
- python - Python 脚本无法从 XML 中提取数据
- docker - Docker撰写端口映射,主机端口!=容器端口
- python - 需要帮助将时间戳正确传递给字典
- android - 显示此应用的 Google Play 与此版本不兼容