IonicaBizau / image-to-ascii

:floppy_disk: A Node.js module that converts images to ASCII art.
http://ionicabizau.net/blog/16
MIT License
1.58k stars 106 forks source link

3.0.0—Modularize all the things, GraphicsMagick is optional, (better) Windows support #25

Closed IonicaBizau closed 8 years ago

IonicaBizau commented 8 years ago

I have been working on this new major release since September, last year. It was a huge work to break, split and modularize the previous code. :sweat_smile:

GraphicsMagick is still recommended to be installed on the system, but in case if it's not installed, the library will compile lwip—a nice Node.js image processor. :sparkles:

After upgrading to couleurs@6.0.0 we got a better Windows support—in fact, this library is now compatible with the 16 colors from the Windows command prompt. Pretty cool, eh? :grin:

I refactored the code base from scratch. I used ES2015 features which means you should run this using Node.js >= 4.0.0.

Another nice feature is that you can use an existing image buffer as input. Using an url or local path works too. :dizzy: Fixes #24.

Few other features are the new options that I added: custom/transparent background (defaults to white), custom stringify function etc. They are documented in the README.md file. :memo:

By turning off the concat and stringify options we will get an object back (not a string). This allows us to modify the image before stringifying it. Fixes #17.


Linux Version

Windows Version

I split the monolithic structure that was here before in small reusable modules that are dependencies of this library. If someone is interested to see how the dependencies graph looks like, there you go:

rgbkrk commented 8 years ago

I used ES2015 features which means you should run this using Node.js >= 4.0.0.

game on for us!

love the Windows support

IonicaBizau commented 8 years ago

game on for us!

What does that mean? Is it something good? :smile:

love the Windows support

Maybe one day Microsoft will switch from 16 colors to 16 million colors in Command Prompt. :joy:

rgbkrk commented 8 years ago

What does that mean? Is it something good? :smile:

Yes! The project I'm using this in requires node 4+. The phrase "game on" in this context means that "we're good to go, let's do this."

Maybe one day Microsoft will switch from 16 colors to 16 million colors in Command Prompt. :joy:

Is it different in PowerShell?

IonicaBizau commented 8 years ago

Is it different in PowerShell?

I have no idea. Just try it. Basically it's smart enough to get the best compatibility: 16 million colors (true color), 256 colors, 16 colors, no color at all. :grin:

rgbkrk commented 8 years ago

Ah, k. Cool!

yowakita commented 8 years ago

This is awesome, I definitely wanna play around with this this weekend.