All Projects β†’ IonicaBizau β†’ Image To Ascii

IonicaBizau / Image To Ascii

Licence: mit
πŸ’Ύ A Node.js module that converts images to ASCII art.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Image To Ascii

Stonks
Stonks is a terminal based stock visualizer and tracker that displays realtime stocks in graph format in a terminal. See how fast your stonks will crash.
Stars: ✭ 405 (-69.5%)
Mutual labels:  hacktoberfest, ascii-art
Hotel booking app
🏩 πŸ“‘ ❀️ Demo application for hotel booking app made with @flutter and love.
Stars: ✭ 94 (-92.92%)
Mutual labels:  hacktoberfest
Atox
Reasonable Tox client for Android
Stars: ✭ 90 (-93.22%)
Mutual labels:  hacktoberfest
Natural Gallery Js
A lazy load, infinite scroll and natural layout list gallery
Stars: ✭ 93 (-93%)
Mutual labels:  hacktoberfest
Bulma Toast
Bulma's pure JavaScript extension to display toasts
Stars: ✭ 93 (-93%)
Mutual labels:  hacktoberfest
Plexdrive
Plexdrive mounts your Google Drive FUSE filesystem (optimized for media playback)
Stars: ✭ 1,324 (-0.3%)
Mutual labels:  hacktoberfest
Tutorialdb
A search πŸ”Ž engine for programming/dev tutorials, See it in action πŸ‘‰
Stars: ✭ 93 (-93%)
Mutual labels:  hacktoberfest
Bitalarm
An app to keep track of different cryptocurrencies, written in dart + flutter
Stars: ✭ 94 (-92.92%)
Mutual labels:  hacktoberfest
Kotlinfixture
Fixtures for Kotlin providing generated values for unit testing
Stars: ✭ 94 (-92.92%)
Mutual labels:  hacktoberfest
Retrotxt
RetroTxt is the WebExtension that turns ANSI, ASCII, NFO text into in-browser HTML
Stars: ✭ 93 (-93%)
Mutual labels:  ascii-art
Arduino Amiibo Tools
Arduino sketches to play with amiibo
Stars: ✭ 93 (-93%)
Mutual labels:  hacktoberfest
Play
The free and open source karaoke singing game UltraStar Play for Windows, Linux, Android, Xbox, PlayStation and other platforms.
Stars: ✭ 94 (-92.92%)
Mutual labels:  hacktoberfest
Haskell Music
Source Code from "Making Music with Haskell" video
Stars: ✭ 94 (-92.92%)
Mutual labels:  hacktoberfest
Bin
~/bin
Stars: ✭ 93 (-93%)
Mutual labels:  hacktoberfest
Coursera Java For Android
Solutions for the course Java for Android
Stars: ✭ 94 (-92.92%)
Mutual labels:  hacktoberfest
Tasklite
The CLI task manager for power users
Stars: ✭ 91 (-93.15%)
Mutual labels:  hacktoberfest
Coteafs Appium
πŸ“± Wrapper Appium Framework in Java which supports Automation of Mobile and Tablet apps.
Stars: ✭ 93 (-93%)
Mutual labels:  hacktoberfest
Adyen Php Api Library
Adyen API Library for PHP
Stars: ✭ 93 (-93%)
Mutual labels:  hacktoberfest
Marshmallow Oneofschema
Marshmallow library extension that allows schema (de)multiplexing
Stars: ✭ 94 (-92.92%)
Mutual labels:  hacktoberfest
Polybar Kdeconnect
KDEConnect module for Polybar
Stars: ✭ 94 (-92.92%)
Mutual labels:  hacktoberfest

image-to-ascii

image-to-ascii

Support me on Patreon Buy me a book PayPal Ask me anything Version Downloads Get help on Codementor

Buy Me A Coffee

A Node.JS module that converts images to ASCII art.

image-to-ascii

☁️ Installation

# Using npm
npm install --save image-to-ascii

# Using yarn
yarn add image-to-ascii

πŸ’‘ ProTip: You can install the cli version of this module by running npm install --global image-to-ascii-cli (or yarn global add image-to-ascii-cli).

Check out the INSTALLATION.md guide for more information.

πŸ“‹ Example

// Dependencies
const imageToAscii = require("image-to-ascii");

// The path can be either a local path or an url
imageToAscii("https://octodex.github.com/images/octofez.png", (err, converted) => {
    console.log(err || converted);
});

// Passing options
imageToAscii("https://octodex.github.com/images/privateinvestocat.jpg", {
    colored: false
}, (err, converted) => {
    console.log(err || converted);
});

In order to run the webcam.sh provided in the example folder, you will also need streamer. The script uses streamer to make webcam pictures and converts them into ASCII art using the webcam.js

# Ubuntu
$ sudo apt-get install streamer

# CentOS / RHEL
$ sudo yum install --enablerepo epel GraphicsMagick

To run the script just use:

sh webcam.sh

❓ Get Help

There are few ways to get help:

  1. Please post questions on Stack Overflow. You can open issues with questions, as long you add a link to your Stack Overflow question.
  2. For bug reports and feature requests, open issues. πŸ›
  3. For direct and quick help, you can use Codementor. πŸš€

πŸ“ Documentation

imageToAscii(source, options, callback)

Converts the provided image in ASCII art.

Params

  • String|Buffer source: The path/url to the image or a Buffer object.
  • Object|String options: The path to the image or an object containing the following fields:

Size Options:

  • pxWidth (Number): The pixel width used for aspect ratio (default: 2).
  • size (Object): The size of the result image (ASCII art)β€”interpreted by compute-size:
    • height (Number|String): The height value (default: "100%").
    • width (Number|String): The width value (default: computed value to keep aspect ratio). This is optional if the height is provided.
  • size_options (Object): The options for compute-size:
    • screen_size (Object): The screen size (defaults to terminal width and height):
      • width (Number): The screen width.
      • height (Number): The screen height.
    • px_size (Object): The pixel size.
      • width (default: 1)
      • height (default: 1)
    • preserve_aspect_ratio (Boolean): If false, the aspect ratio will not be preserved (default: true).
    • fit_screen (Boolean): If false, the result size will not fit to screen (default: true).

Matrix asciifier options:

  • stringify (Boolean): If false, the pixel objects will not be stringified.
  • concat (Boolean): If false, the pixel objects will not be joined together.

Pixel asciifier options:

  • pixels (Array|String): An array or string containing the characters used for converting the pixels in strings (default: " .,:;[email protected]").
  • reverse (Boolean): If true, the pixels will be reversed creating a negative image effect (default: false).
  • colored (Boolean): If true, the output will contain ANSI styles (default: true).
  • bg (Boolean): If true, the background color will be used for coloring (default: false).
  • fg (Boolean): If true, the foreground color will be used for coloring (default: true).
  • white_bg (Boolean): Turn on the white background for transparent pixels (default: true).
  • px_background (Object): An object containing the r (red), g (green) and b (blue) values of the custom background color.

Other options:

  • image_type (String): Use this to explicitely provide the image type.
  • stringify_fn (Function): A function getting the pixels matrix and the options in the arguments. Use this option to implement your own stringifier.
  • Function callback: The callback function.

πŸ˜‹ How to contribute

Have an idea? Found a bug? See how to contribute.

πŸ’– Support my projects

I open-source almost everything I can, and I try to reply to everyone needing help using these projects. Obviously, this takes time. You can integrate and use these projects in your applications for free! You can even change the source code and redistribute (even resell it).

However, if you get some profit from this or just want to encourage me to continue creating stuff, there are few ways you can do it:

  • Starring and sharing the projects you like πŸš€

  • Buy me a bookβ€”I love books! I will remember you after years if you buy me one. 😁 πŸ“–

  • PayPalβ€”You can make one-time donations via PayPal. I'll probably buy a coffee tea. 🍡

  • Support me on Patreonβ€”Set up a recurring monthly donation and you will get interesting news about what I'm doing (things that I don't share with everyone).

  • Bitcoinβ€”You can send me bitcoins at this address (or scanning the code below): 1P9BRsmazNQcuyTxEqveUsnf5CERdq35V6

Thanks! ❀️

πŸ’« Where is this library used?

If you are using this library in one of your projects, add it in this list. ✨

  • gif-cli
  • aceituna
  • gongxi
  • noslide-js
  • sprite-cli-js
  • terminal-sidecar
  • @radic/cli
  • tmuxos
  • ascii-github
  • alphabet-cli
  • nrk-tv-cli
  • kayak-inside
  • nobro
  • goteem
  • imgurize
  • doomjs
  • image-to-js
  • salestock-cli
  • joctodex
  • path-cli
  • ascii-video
  • js2image
  • moltres-cli
  • image-to-ascii-cli
  • img-to-svg
  • mdy
  • node.cobol
  • bing-cli
  • ick
  • cli-emoji
  • cli-github

πŸ“œ License

MIT © Ionică Bizău

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].