[kd-rs] ascii-gen - 将图像转换为 ASCII 艺术的 CLI 工具

admin 2023年11月22日20:39:34评论41 views字数 527阅读1分45秒阅读模式

ascii-gen

这个 Rust 工具将图像转换为 ASCII 艺术。它以图像文件为输入,根据指定的宽度和高度参数调整其大小,然后将图像转换为 ASCII 字符。

项目地址:

https://github.com/thed24/ascii-gen

依赖

  • clap - Command-line argument parser for Rust.
  • image - Image processing library for Rust.
  • crossterm - Cross-platform terminal manipulation library for Rust.
  • ratatui - TUI (Text-based User Interface) library for Rust.

例如

ascii-gen --file path/to/your/image.jpg --width 120 --height 60

ascii-gen --file path/to/your/image.jpg --width 120 --height 60 --live

来吧,展示

[kd-rs] ascii-gen - 将图像转换为 ASCII 艺术的 CLI 工具

这不能体现效果,再来张

[kd-rs] ascii-gen - 将图像转换为 ASCII 艺术的 CLI 工具

[kd-rs] ascii-gen - 将图像转换为 ASCII 艺术的 CLI 工具

还有几张就交给大家做作业了

[kd-rs] ascii-gen - 将图像转换为 ASCII 艺术的 CLI 工具

[kd-rs] ascii-gen - 将图像转换为 ASCII 艺术的 CLI 工具

 

原文始发于微信公众号(Eonian Sharp):[kd-rs] ascii-gen - 将图像转换为 ASCII 艺术的 CLI 工具

  • 左青龙
  • 微信扫一扫
  • weinxin
  • 右白虎
  • 微信扫一扫
  • weinxin
admin
  • 本文由 发表于 2023年11月22日20:39:34
  • 转载请保留本文链接(CN-SEC中文网:感谢原作者辛苦付出):
                   [kd-rs] ascii-gen - 将图像转换为 ASCII 艺术的 CLI 工具http://cn-sec.com/archives/2229292.html

发表评论

匿名网友 填写信息