# img2epaper

> This package is used to convert an image into an array that can be displayed on epaper.

Latest version **1.1.7** (published 2023-06-14) · Apache license · 0 weekly downloads

## Install

```sh
npm install img2epaper
pnpm add img2epaper
yarn add img2epaper
bun add img2epaper
```

Provides the command `imgconvert`.

## 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.7 |
| Published | 2023-06-14 |
| First published | 2023-05-23 |
| Weekly downloads | 0 |
| License | Apache |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 23.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | plxiaow |
| Maintainers | chutiann, plxiaow |
| Keywords | epaper, image, convert |

## Links

- npm: https://www.npmjs.com/package/img2epaper
- Repository: https://github.com/tiannahaha/img2epaper
- Homepage: https://github.com/tiannahaha/img2epaper#readme
- Issues: https://github.com/tiannahaha/img2epaper/issues
- npm.io page: https://npm.io/package/img2epaper

## Dependencies (3)

- [jimp](https://npm.io/package/jimp.md) ^0.22.8
- [chalk](https://npm.io/package/chalk.md) ^4.0.0
- [commander](https://npm.io/package/commander.md) ^10.0.1

## Alternatives

- [exif-parser](https://npm.io/package/exif-parser.md) — 3.8M weekly downloads
- [vite-plugin-compression](https://npm.io/package/vite-plugin-compression.md) — 569.5K weekly downloads
- [pica](https://npm.io/package/pica.md) — 442.4K weekly downloads
- [@reportportal/client-javascript](https://npm.io/package/@reportportal/client-javascript.md) — 408.8K weekly downloads
- [@tldraw/state](https://npm.io/package/@tldraw/state.md) — 316.0K weekly downloads

## Recent versions

- 1.1.7 (latest) — 2023-06-14
- 1.1.6 — 2023-06-14
- 1.1.5 — 2023-06-08
- 1.1.4 — 2023-06-07
- 1.1.3 — 2023-06-07
- 1.1.2 — 2023-06-06
- 1.1.1 — 2023-06-05
- 1.1.0 — 2023-05-26
- 1.0.3 — 2023-05-23

## README

# Describe 
This package is used to convert an image into an array that can be displayed on epaper.

The input file should be one of the formats `[.png, .bmp, .jpeg]`, and the output will be either `.c` or `.bin`.
The .c file can be directly copied into the project and used as a global variable.
The .bin file is more suitable for communication over the network, such as obtaining and displaying it through HTTP requests.
It should be noted that the size of the input image must be the same as the screen size!

# Condition
Your node environment should install the following dependencies
```
  "dependencies": {
    "chalk": "^4.0.0",
    "commander": "^10.0.1",
    "jimp": "^0.22.8"
  }
```

# Use&Example

- Enter `imgconvert --help` to view help

The file name must include a file suffix.

- Convert the image to a .c file stored in hexadecimal format.

​    `imgconvert -i <input.png> -o1 <output1.c> -o2 <output2.c> -H -m 1`
- Convert the image to a .bin file stored in binary format.

​    `imgconvert -i <input.png> -o1 <output1.bin> -o2 <output2.bin> -B -m 1`

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