Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Difference between image-to-ascii and cli? #36

Closed
hansanghoon opened this issue Jun 3, 2016 · 6 comments
Closed

Difference between image-to-ascii and cli? #36

hansanghoon opened this issue Jun 3, 2016 · 6 comments

Comments

@hansanghoon
Copy link

dsc08890

Hi, I tried to convert above image using image-to-ascii and image-to-ascii-cli.

my code is as below.

const imageToAscii = require("image-to-ascii");
const pxs = ".`:,;'_^\"\\></-!~=)(|j?}{ ][ti+l7v1%yrfcJ32uIC$zwo96sngaT5qpkYVOL40&mG8*xhedbZUSAQ
PFDXWK#RNEHBM@";

imageToAscii("DSC08890.JPG",
  {pixels:pxs},
  (err, converted) => { console.log(err || converted); }
);

results are

screen shot 2016-06-03 at 4 49 15 pm

Would you let me know how can I produce ascii image like image-to-ascii-cli using image-to-ascii? What options do I need?
Thanks.

@IonicaBizau
Copy link
Owner

What terminal emulator are you using? It looks like the color support is not correctly detected, but you can enforce it by using: node your-script.js --color=256

More info: https://github.com/chalk/supports-color#info

@IonicaBizau
Copy link
Owner

The cli is using an older version of the module. 🔥

@hansanghoon
Copy link
Author

hansanghoon commented Jun 3, 2016

screen shot 2016-06-03 at 5 06 13 pm

--color=256 works! Thanks. My mac terminal profile says Declare terminal as: ansi

@IonicaBizau
Copy link
Owner

@hansanghoon Ah, change that to xterm-256color. You will get 256 colors. ✨

@hansanghoon
Copy link
Author

Got it. Thanks for quick response to my question 👍 😄

@IonicaBizau
Copy link
Owner

Great! Have fun using this module! 😁

On 03 Jun 2016, at 11:13, Han, Sanghoon notifications@github.com wrote:

Got it. Thanks for quick response to my question 👍 😄


You are receiving this because you commented.
Reply to this email directly, view it on GitHub #36 (comment), or mute the thread https://github.com/notifications/unsubscribe/ACu08yn4K7E_60BYdOKKVKY11UEe-Exsks5qH-ISgaJpZM4ItShY.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants