node package manager
Don’t reinvent the wheel. Reuse code within your team. Create a free org »

img2text

node-img2text

My version of Hit9's img2txt, written in javascript.

Installing

npm install img2text -g

Arguments

img2text <imgfile> [-a] [--font-size=<fontsize>]

or

i2t <imgfile> [-a] [--font-size=<fontsize>]

the optional arguments :

-a              Enable ascii mode
--font-size     The font-size(px) pf text in the html, default:5.

The results will be in the result.html file.

Todo

  • I'm gonna add some extra options such as pixelspacing in between pixels and/or automatic calculation of pixelspacing.
  • Add another way to receive the results from the script.