{"id":18823610,"url":"https://github.com/yvt/img2text","last_synced_at":"2025-04-14T01:30:39.663Z","repository":{"id":39894086,"uuid":"335712713","full_name":"yvt/img2text","owner":"yvt","description":"Image-to-text converter","archived":false,"fork":false,"pushed_at":"2023-01-23T16:15:38.000Z","size":861,"stargazers_count":23,"open_issues_count":2,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-11T16:16:11.031Z","etag":null,"topics":["cli-utility","converter","graphics","rust","unicode","web-application","yew"],"latest_commit_sha":null,"homepage":"https://img2text.yvt.jp","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yvt.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-02-03T18:07:47.000Z","updated_at":"2025-02-16T08:50:36.000Z","dependencies_parsed_at":"2023-02-13T00:46:15.916Z","dependency_job_id":null,"html_url":"https://github.com/yvt/img2text","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yvt%2Fimg2text","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yvt%2Fimg2text/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yvt%2Fimg2text/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yvt%2Fimg2text/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yvt","download_url":"https://codeload.github.com/yvt/img2text/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248807302,"owners_count":21164659,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli-utility","converter","graphics","rust","unicode","web-application","yew"],"created_at":"2024-11-08T00:54:10.631Z","updated_at":"2025-04-14T01:30:39.619Z","avatar_url":"https://github.com/yvt.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `img2text`\n\n\u003ca href=\"https://crates.io/crates/img2text\"\u003e\u003cimg src=\"https://img.shields.io/crates/v/img2text?style=for-the-badge\"\u003e\u003c/a\u003e\n\n## `img2text` on Terminal\n\n```\nimg2text\n\nImage-to-text converter\n\n                 ⠀⠀⠀⠀⠀⠀⠀⢠⣄⣠⣶⣤⣿⣤⣶⣄⣠⡄⠀⠀⠀⠀⠀⠀⠀\n                 ⠀⠀⠀⠀⣄⣸⣿⣾⡿⠿⠛⢿⣀⡿⠛⠿⢿⣷⣿⣇⣠⠀⠀⠀⠀\n                 ⠀⠀⢠⣤⣿⣿⣛⣁⣀⣀⣀⣀⣉⣀⣀⣀⡀⠈⠛⢿⣿⣤⡄⠀⠀\n                 ⠀⠲⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⡄⠈⣿⣿⣷⠖⠀\n                 ⠐⢾⣿⣤⠼⠇⢸⣿⣿⣿⣇⣀⣀⣀⣹⣿⣿⣿⠇⠸⢧⣤⣿⡷⠂\n    powered by:  ⠰⢿⣿⡇⠀⠀⢸⣿⣿⣿⡿⠿⠿⢿⣿⣿⣿⣦⠀⠀⢀⣸⣿⡿⠆\n                 ⠐⠿⣿⣷⣤⣤⣼⣿⣿⣿⣧⣤⣄⠀⢻⣿⣿⣿⣦⣤⣾⣿⣿⠿⠂\n                 ⠀⠚⢿⣿⣿⡿⠿⠿⠿⠿⠿⠿⠿⠀⠈⠻⠿⠿⠿⢿⣿⣿⡿⠓⠀\n                 ⠀⠀⠘⠛⣿⣿⡟⢻⡆⠀⠀⠀⠀⠀⠀⠀⣸⠛⢳⣿⣿⠛⠃⠀⠀\n                 ⠀⠀⠀⠀⠉⢹⡿⢿⣿⣷⣶⣶⣶⣶⣶⣾⣿⡿⢿⡏⠉⠀⠀⠀⠀\n                 ⠀⠀⠀⠀⠀⠀⠀⠈⠉⠘⠟⠙⠿⠋⠻⠃⠉⠁⠀⠀⠀⠀⠀⠀⠀\n\n(The above image was generated by this program with an option `-s 25`.)\n\nUSAGE:\n    img2text [OPTIONS] \u003cFILE\u003e\n\nARGS:\n    \u003cFILE\u003e\n            The image to process\n\nFLAGS:\n    -d, --dither\n            Apply dithering to preserve the gray shades. Incompatible with `-i\n            edge-canny`\n\n    -h, --help\n            Prints help information\n\n    -V, --version\n            Prints version information\n\n\nOPTIONS:\n    -w \u003ccell-width\u003e\n            The width of output characters, only used when `-s` is given without\n            `!` [default: 0.45]\n\n        --dither-contrast \u003cdither-contrast\u003e\n            Choose the contrast enhancing technique to use for dithering\n            [default: median-quant] [possible values: none, median-quant,\n            equalize]\n\n        --canny-high-threshold \u003cedge-canny-high-threshold\u003e\n            A parameter for the Canny edge detector (`-i edge-canny`).\n\n            Edges with a strength higher than the high threshold will always\n            appear as edges in the output image. [default: 20]\n\n        --canny-low-threshold \u003cedge-canny-low-threshold\u003e\n            A parameter for the Canny edge detector (`-i edge-canny`).\n\n            Edges with a strength higher than the low threshold will appear in\n            the output image if there are strong edges nearby. [default: 10]\n\n    -i \u003cinput-ty\u003e\n            Specifies how to interpret the input image [default: auto] [possible\n            values: auto, wob, bow, edge-canny]\n\n    -s \u003cout-size\u003e\n            The output size, measured in character cells or percents (e.g.,\n            `80`, `80x40`, `80x40!`, `-80x40`, `100%`). [default: downscale to\n            terminal size (if the output is a terminal) or 100% (otherwise)]\n\n            - 80: Fit within 80x80 character cells\n\n            - 80x40: Fit within 80x40 character cells, upscaling as necessary\n\n            - -80x40: Fit within 80x40 character cells, only downscaling\n\n            - 80x40!: Fit to 80x40 character cells, not maintaining the aspect\n            ratio\n\n            - 150%: Scale by 150%. The actual output size depends on the glyph\n            set being used; for example, `2x3` maps each 2x3 block to one\n            character.\n\n    -g \u003cstyle\u003e\n            The glyph set to use [default: braille] [possible values: slc, \n            ms2x3, 1x1, 1x2, 2x2, 2x3, braille]\n```\n\n### Installing\n\nFirst, make sure [rustup](https://www.rust-lang.org/tools/install) or Rust 1.49.0 or later is installed. Then run the following command:\n\n```\ncargo install img2text\n```\n\nThis will compile and install `img2text` the CLI app to `~/.cargo/bin` or somewhere else in your system.\n\n### Recommended Font\n\n[Fairfax HD](http://www.kreativekorp.com/software/fonts/fairfaxhd.shtml) can display all characters (particularly [Symbols for Legacy Computing]) generated by this program.\n\n[Symbols for Legacy Computing]: https://en.wikipedia.org/wiki/Symbols_for_Legacy_Computing\n\n## `img2text` on Web\n\n\u003chttps://img2text.yvt.jp\u003e is a single-page static website.\n\n### Developing\n\nPrerequisites:\n\n - [`wasm-pack`](https://crates.io/crates/wasm-pack)\n - [`cargo-license`](https://crates.io/crates/cargo-license)\n - [`extrude-licenses`](https://crates.io/crates/extrude-licenses)\n - [Binaryen](https://github.com/WebAssembly/binaryen)\n - [rustup](https://www.rust-lang.org/tools/install)\n - [lessc](http://lesscss.org)\n - [FontTools](https://github.com/fonttools/fonttools)\n - ... or just use [Nix](https://nixos.org) and run `nix develop` to install all of them\n - (*Optional*) [`cargo-watch`](https://crates.io/crates/cargo-watch)\n\n```shell\ncd web\nmake\npython -m http.server\n```\n\nTo continuously rebuild:\n\n```shell\ncd web/static\npython -m http.server \u0026\ncd ..\ncargo watch -s make -i static\n```\n\n## `img2text` in Your App\n\nAdd the following to your app's `Cargo.toml` file:\n\n```toml\n[dependencies]\nimg2text = { version = \"0.1.0\", default-features = false }\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyvt%2Fimg2text","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyvt%2Fimg2text","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyvt%2Fimg2text/lists"}