Created
April 28, 2022 06:46
-
-
Save SpiffGreen/1dbbf1d53f320132c61e85e78eb1f1ba to your computer and use it in GitHub Desktop.
Image pixel manipulation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* @description An image to ascii text conversion library | |
*/ | |
class ImageToAscii { | |
constructor(image) { | |
this.image = image; | |
this.toText = this.toText.bind(this); | |
} | |
#toGrayScale() {} | |
#resize() {} | |
toText() {} | |
} | |
const imgToText = new ImageToAscii(img); | |
const text = imgToText.toText(); | |
console.log(text) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment