# outline-image

> Outlines blocks of color in transparent PNG images

Latest version **0.0.5** (published 2021-09-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install outline-image
pnpm add outline-image
yarn add outline-image
bun add outline-image
```

Provides the command `outline`.

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.5 |
| Published | 2021-09-19 |
| First published | 2021-09-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 7.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | brendan-c |
| Maintainers | brendan-c |
| Keywords | jimp, outline, image-manipulation |

## Links

- npm: https://www.npmjs.com/package/outline-image
- Repository: https://github.com/brendan-c/Outline-Image
- Homepage: https://github.com/brendan-c/Outline-Image#readme
- Issues: https://github.com/brendan-c/Outline-Image/issues
- npm.io page: https://npm.io/package/outline-image

## Dependencies (1)

- [jimp](https://npm.io/package/jimp.md) ^0.16.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

- 0.0.5 (latest) — 2021-09-19
- 0.0.4 — 2021-09-18
- 0.0.3 — 2021-09-17
- 0.0.2 — 2021-09-17
- 0.0.1 — 2021-09-17

## README

# Usage

`npm install outline-image`

## Example
```
const outlineImage = require('outline-image')

outlineImage (
  imagePath,    // {string}
  outputPath,   // {string}
  outlineColor, // {array [red, blue, green, alpha]} (represented as numbers 0-255)
                //  OR hex string}
  trim = true   // {boolean}
)
```

## as CLI tool
```
// only accepts hex string
// trim {string 'trim'} optional
npx outline 'input.png' 'output.png' '#ffffff 'trim'
```

### Note:
This package is very limited in it's functionality. In it's current form (0.0.x), it has the following limitations:

- Only draws outline on transparent pixels
  - Input images (`imagePath`) must be PNG format and contain transparency
- Only draws 1px wide outline
- Adds full 1px transparent border prior to drawing outline to ensure full outline
- `trim` (optional, default = true) removes **all** excess transparent border after outline is drawn

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