内容简介:img2txt [ -W width ] [ -H height ] [ -x font-width ] [ -y font-height ][ -b brightness ] [ -c contrast ] [ -g gamma ][ -d dither ] [ -f format ] FILE
img2txt可以转化为彩色的图案,你还可以指定图案大小。
语法:
img2txt [ -W width ] [ -H height ] [ -x font-width ] [ -y font-height ]
[ -b brightness ] [ -c contrast ] [ -g gamma ]
[ -d dither ] [ -f format ] FILE
描述
img2txt将图像转换为彩色ASCII字符,并将其输出为基于文本的彩色文件。
img2txt可以加载最广泛的图像格式:PNG、JPEG、GIF、PNG、BMP等(详细信息请参阅说明)。默认情况下,输出文本为60列宽,根据原始文件的纵横比相应地计算行数。默认输出格式是标准的ANSI彩色文本。
选项
-W, --width=<width>
更改输出列计数。如果没有给出,默认设置为60。
-H, --height=<height>
更改输出行数。如果没有给出,则计算高度以匹配正确的纵横比。
-x, --font-width=<width>
更改输出字体宽度。 如果未给出,则默认设置为6,此值将用于计算宽高比。
-y, --font-height=<height>
更改输出字体高度。 如果未给出,则默认设置为10.此值将用于计算宽高比。
-b, --brightness=<brightness>
改变图像亮度。 默认为1.0。
-c, --contrast=<contrast>
改变图像对比度。 默认为1.0。
-g, --gamma=<gamma>
更改图像伽玛。 默认为1.0。
-d, --dither=<dither>
改变抖动算法。 这可以是以下之一(默认为fstein):
none : Nearest color
ordered2 : Ordered 2x2
ordered4 : Ordered 4x4
ordered8 : Ordered 8x8
random : Random
fstein : Floyd Steinberg
-f, --format=<format>
更改输出格式。 这可以是以下之一(默认为ansi):
ansi : coloured ANSI
caca : internal libcaca format
utf8 : UTF8 with CR
utf8cr : UTF8 with CRLF (MS Windows)
html : HTML with CSS and DIV support
html3 : Pure HTML3 with tables
irc : IRC with ctrl-k codes
bbfr : BBCode (French)
ps : Postscript
svg : 可缩放矢量图形
tga : Targa图像
-h, --help
显示帮助消息并退出。
-v, --version
显示程序的版本并退出。
例子
img2txt linuxidc.com.png > linuxidc.com.ans
img2txt --width=200 --format=svg linuxidc.com.jpg > linuxidc.com.svg
img2txt --width=50 --format=html --gamma=1.5 --dither=ordered2 linuxidc.png > linuxidc.com.html
注释
设置列数和行数(使用--width和--height)将允许您选择确切的输出大小而不考虑宽高比。
您必须在Imlib2的支持下编译libcaca包才能加载各种各样的包图像格式。 否则,您只能加载常规BMP文件。
另请参阅cacaview,见 https://www.linuxidc.com/Linux/2018-12/155988.htm
Linux公社的RSS地址 : https://www.linuxidc.com/rssFeed.aspx
本文永久更新链接地址: https://www.linuxidc.com/Linux/2018-12/155989.htm
以上所述就是小编给大家介绍的《img2txt - 将图像转换为各种基于文本的彩色文件》,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对 码农网 的支持!
猜你喜欢:- css – 浮动流体图像留下文本包装
- CVPR 2019 论文大盘点(文本图像相关篇)
- 2017.4.17-2017.4.21文本分类,XGBoost综述,图像识别
- Serverless 打造智能微信小程序:图像识别分析文本
- 通用的图像-文本语言表征学习:多模态预训练模型 UNITER
- CKEditor 5 v23.0.0 发布:改进图像上传功能和纯文本粘贴
本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
Rework
Jason Fried、David Heinemeier Hansson / Crown Business / 2010-3-9 / USD 22.00
"Jason Fried and David Hansson follow their own advice in REWORK, laying bare the surprising philosophies at the core of 37signals' success and inspiring us to put them into practice. There's no jarg......一起来看看 《Rework》 这本书的介绍吧!