All Projects → victorqribeiro → Imgtoascii

victorqribeiro / Imgtoascii

Licence: mit
A JavaScript implementation of a image to Ascii code

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Imgtoascii

How-to-use-Readline-in-NodeJS
⌨️ How to manipulate the terminal window using NodeJS
Stars: ✭ 20 (-93.96%)
Mutual labels:  ascii, ascii-art
gifterm
View animated .GIF files in a text console. Linux/Mac/Windows
Stars: ✭ 14 (-95.77%)
Mutual labels:  ascii, ascii-art
durdraw
Animated Unicode, ANSI and ASCII Art Editor for Linux/Unix/macOS
Stars: ✭ 55 (-83.38%)
Mutual labels:  ascii, ascii-art
asciju
Conversion of Image, video, text into ASCII format
Stars: ✭ 11 (-96.68%)
Mutual labels:  ascii, ascii-art
hasciicam
(h)ascii for the masses! html refreshed ascii video cam
Stars: ✭ 63 (-80.97%)
Mutual labels:  ascii, ascii-art
jpgtxt
Generating jpg files that can be viewed both in image viewer and text editor (as ASCII art)
Stars: ✭ 24 (-92.75%)
Mutual labels:  ascii, ascii-art
Pyvips
python binding for libvips using cffi
Stars: ✭ 296 (-10.57%)
Mutual labels:  image-processing, image-manipulation
asciiarena
Terminal multiplayer deathmatch game
Stars: ✭ 34 (-89.73%)
Mutual labels:  ascii, ascii-art
lexicon-mono-seq
DOM Text Based Multiple Sequence Alignment Library
Stars: ✭ 15 (-95.47%)
Mutual labels:  ascii, ascii-art
ascii chart
Nice-looking lightweight console ASCII line charts ╭┈╯. Port of kroitor/asciichart.
Stars: ✭ 24 (-92.75%)
Mutual labels:  ascii, ascii-art
ascii-art
ASCII art images for Neofetch (and beyond)
Stars: ✭ 27 (-91.84%)
Mutual labels:  ascii, ascii-art
Csconsoleformat
.NET C# library for advanced formatting of console output [Apache]
Stars: ✭ 296 (-10.57%)
Mutual labels:  ascii, ascii-art
magrrite
Generate ASCII art from any image
Stars: ✭ 21 (-93.66%)
Mutual labels:  ascii, ascii-art
ascii-art
Given a image.bmp and a M x N group of pixels, generate a text that represents the image.bmp in ascii characters
Stars: ✭ 16 (-95.17%)
Mutual labels:  ascii, ascii-art
outfancy
Python3 library to print tables in Terminal.
Stars: ✭ 47 (-85.8%)
Mutual labels:  ascii, ascii-art
asciisciit
ASCII Art, Video, and Plotting Toolbox
Stars: ✭ 71 (-78.55%)
Mutual labels:  ascii, ascii-art
Picture-To-Ascii
Converts a picture to Ascii.
Stars: ✭ 18 (-94.56%)
Mutual labels:  ascii, ascii-art
ascii.js
A web-font-based rendering engine for displaying DOS/Amiga ASCII artwork on the web as text
Stars: ✭ 25 (-92.45%)
Mutual labels:  ascii, ascii-art
figlet4s
ASCII-art banners in Scala
Stars: ✭ 29 (-91.24%)
Mutual labels:  ascii, ascii-art
Menyoki
Screen{shot,cast} and perform ImageOps on the command line 🌱 🏞️
Stars: ✭ 255 (-22.96%)
Mutual labels:  image-processing, image-manipulation

imgToAscii

A JavaScript implementation of a image to ascii converter.

Live example

How to use

Include the imgToAscii.js file

<script src="src/imgToAscii.js"></script>

or

<script src="https://raw.githubusercontent.com/victorqribeiro/imgToAscii/v1.3/src/imgToAscii.js"></script>

then just create a new imgToAscii object with the image address and optionaly the alphabet: (0 - simpler shades, 1 - more complex shades) - default is 0

let ele = new imgToAscii('elefante.png');
ele.display();

You can also resize your image passing a second parameter between 0 and 1 as percentage. e.g.: 0.5 = 50% - Will reduce the size of your image in 50% both vertical and horizontal (width, height).

let eu = new imgToAscii('eu.png',0.5);
eu.display();

To display the ASCII image with color just call the method displayColor(). You can set the background color of your image passing a color parameter to the method. e.g.: gray, white, black, #fff, rgb(10,10,10). Default is transparent.

eu.displayColor('gray');

Note that on the code above the same 'eu' image was used. Once you load an image, you can display it with or without color, without the need to reload the image data.

Important

The ascii art depends on a monospace font to work properly. You should consider that 1 pixel in your image is going to be translated to 1 char in Ascii. e.g.: if a image is 100 pixels wide, it's going to take 100 chars of space on your page, unless you do something about it.

The imgToAscii should work with remote images:

let img = new imgToAscii('http://site.com/image.png');

but it might not because of cross-origin settings. Keep that in mind.


A similar code is running on my photoEditor to generate a image of the ascii code (what?!)

result

result

result

Open Source Helpers

Donations

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].