Closed IonicaBizau closed 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
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:
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?
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:
Ah, k. Cool!
This is awesome, I definitely wanna play around with this this weekend.
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
andstringify
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:
image-to-ascii
—A Node.JS module that converts images to ASCII art.asciify-pixel-matrix
—Asciifies a matrix of pixels.asciify-pixel
—Asciifies a pixel object.couleurs
—Add some color and styles to your Node.JS strings.ansy
—Cross platform ANSI colors made easy.custom-return
—Generate a function that returns a constant.noop6
—No operation as a module using an arrow function.pixel-bg
—Change the pixel background color.pixel-class
—A tiny class for pixel manipulation.pixel-white-bg
—Set white background color for a pixel.compute-size
—Helper tool for resizing the things.fixed-or-percent
—Get the percent or fixed value.is-percent
—Check if a given value is in the percent format.last-char
—Get the last character in a provided string.percent-value
—Percentage helper functions.map-o
—Array-map like function for objects.iterate-object
—A convenient way to iterate objects.image-parser
—An image parser that works.err
—A tiny library to create custom errors in JavaScript.typpy
—A better typeof for JavaScript.gm-tools
—Friendly tools for interacting with GraphicsMagick.lwipify
—Convert images in lwip objects.lwip2
—A friendlier wrapper around the lwip library.gm-installed
—Check if GraphicsMagick is installed.prgm-installed
—Check if a program is available on the system.url-remote
—Checks if a given url is a remote url or not.url-local
—Checks if a given url is a local url or not.parse-url
—An advanced url parser supporting git urls too.is-ssh
—Check if an input value is a ssh url or not.protocols
—Get the protocols of an input url.pixel-class
—A tiny class for pixel manipulation.deffy
—Small and fast library to set default values.typpy
—A better typeof for JavaScript.imgpx
lwip-pixels
pixel-class
—A tiny class for pixel manipulation.deffy
—Small and fast library to set default values.typpy
—A better typeof for JavaScript.lwipify
—Convert images in lwip objects.one-by-one
deffy
—Small and fast library to set default values.typpy
—A better typeof for JavaScript.terminal-char-width
ul
—A minimalist utility library.deffy
—Small and fast library to set default values.typpy
—A better typeof for JavaScript.