# image-convert-ascii

> convert image to ascii

Latest version **1.1.2** (published 2022-09-22) · ISC license · 0 weekly downloads

## Install

```sh
npm install image-convert-ascii
pnpm add image-convert-ascii
yarn add image-convert-ascii
bun add image-convert-ascii
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.2 |
| Published | 2022-09-22 |
| First published | 2022-09-21 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 3.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 27 |
| Author | tonymkcv |
| Maintainers | tonymkcv |
| Keywords | ascii, image, convert, img-element, html-ascii, html, ascii-arts, canvas |

## Links

- npm: https://www.npmjs.com/package/image-convert-ascii
- Repository: https://github.com/hoonsbory/image-convert-ascii
- Homepage: https://github.com/hoonsbory/image-convert-ascii#readme
- Issues: https://github.com/hoonsbory/image-convert-ascii/issues
- npm.io page: https://npm.io/package/image-convert-ascii

## Alternatives

- [@tsparticles/shape-image](https://npm.io/package/@tsparticles/shape-image.md) — 303.7K weekly downloads
- [@tsparticles/shape-line](https://npm.io/package/@tsparticles/shape-line.md) — 233.7K weekly downloads
- [stringify-attributes](https://npm.io/package/stringify-attributes.md) — 58.6K weekly downloads
- [mobile-drag-drop](https://npm.io/package/mobile-drag-drop.md) — 46.3K weekly downloads
- [@comunica/actor-rdf-parse-html](https://npm.io/package/@comunica/actor-rdf-parse-html.md) — 29.2K weekly downloads

## Recent versions

- 1.1.2 (latest) — 2022-09-22
- 1.1.1 — 2022-09-22
- 1.1.0 — 2022-09-22
- 1.0.9 — 2022-09-22
- 1.0.8 — 2022-09-21
- 1.0.7 — 2022-09-21
- 1.0.6 — 2022-09-21
- 1.0.5 — 2022-09-21
- 1.0.4 — 2022-09-21
- 1.0.3 — 2022-09-21
- 1.0.2 — 2022-09-21
- 1.0.1 — 2022-09-21
- 1.0.0 — 2022-09-21

## README

## Convert Image to Ascii

convert img element to ascii  
![screenshot](https://cdn.jsdelivr.net/gh/hoonsbory/image-convert-ascii/convertAscii.gif)

### Installation

#### use npm

```bash
$ npm install image-convert-ascii
```

### Syntax

```javascript
new Convert(img element ID, pre element ID, width, height);
```

### Example

#### pre,img element with ID in HTML

```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

```javascript
import Convert from 'image-convert-ascii';
//input img, pre element ID and size
new Convert('img', 'pre', 100, 100);
```

#### in browser

```html
<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>
```

---
_Source: https://npm.io/package/image-convert-ascii · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
