🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

image-convert-ascii

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

image-convert-ascii

convert image to ascii

1.1.2
latest
Source
npm
Version published
Weekly downloads
18
500%
Maintainers
1
Weekly downloads
 
Created
Source

Convert Image to Ascii

convert img element to ascii
screenshot

Installation

use npm

$ npm install image-convert-ascii

Syntax

new Convert(img element ID, pre element ID, width, height);

Example

pre,img element with ID in HTML

<body style="font-size: 10px">
  <pre id="pre"></pre>
  <!-- Insert the image want to convert -->
  <img id="img" src="./asciiTest.png" crossorigin="anonymous" />
</body>

use npm

import Convert from 'image-convert-ascii';
//input img, pre element ID and size
new Convert('img', 'pre', 100, 100);

in browser

<script defer type="module">
  import Convert from 'https://cdn.jsdelivr.net/gh/hoonsbory/image-convert-ascii/Convert.js';
  new Convert('img', 'pre', 100, 100);
</script>

Keywords

ascii

FAQs

Package last updated on 22 Sep 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts