# bitmap-ts

> Library built in [Typescript](https://www.typescriptlang.org/) to load/handle a bitmap file. Support 1, 2, 4, 8, 16(no tested) and 24 bpp. The following functions are available: - read(File) - negative() - rotate90CW() - rotate90CCW() - rotate180() - rota

Latest version **1.0.3** (published 2018-11-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install bitmap-ts
pnpm add bitmap-ts
yarn add bitmap-ts
bun add bitmap-ts
```

## Health

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

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2018-11-16 |
| First published | 2018-11-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 212.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | adamjking3 |
| Keywords | bitmap, bmp, ts, typescript, load, manipulate, transform, filter, browser, node |

## Links

- npm: https://www.npmjs.com/package/bitmap-ts
- Repository: https://github.com/adamjking3/bitmap-ts
- Homepage: https://github.com/adamjking3/bitmap-ts#readme
- Issues: https://github.com/adamjking3/bitmap-ts/issues
- npm.io page: https://npm.io/package/bitmap-ts

## Alternatives

- [csv-to-markdown-table](https://npm.io/package/csv-to-markdown-table.md) — 47.0K weekly downloads
- [@sapphire/ratelimits](https://npm.io/package/@sapphire/ratelimits.md) — 4.4K weekly downloads
- [js-csvparser](https://npm.io/package/js-csvparser.md) — 2.0K weekly downloads
- [@adadapted/js-sdk](https://npm.io/package/@adadapted/js-sdk.md) — 251 weekly downloads
- [@grapecity/spread-sheets-sparklines](https://npm.io/package/@grapecity/spread-sheets-sparklines.md) — 103 weekly downloads

## Recent versions

- 1.0.3 (latest) — 2018-11-16
- 1.0.2 — 2018-11-16
- 1.0.1 — 2018-11-15
- 1.0.0 — 2018-11-15

## README

# bitmap-ts

A typescript library for loading, transforming, and filtering BMP images, directly from the browser.
This is a port from RequireJS to NPM (https://github.com/testica/bitmap-ts).

# Installation

```$ npx install bitmap-ts```

OR

```$ yarn add bitmap-ts```

# Example Usage

```
import { Bitmap } from 'bitmap-ts';

const handleFileChange = (event: React.ChangeEvent<HTMLInputElement>) => {
    const file: File = event.target.files![0];
    const bmp = new Bitmap(file);

    bmp.read((response: Bitmap) => {
      this.imageData = response.currentData();
    });

    const image = new Image();

    image.onload = () => {
      this.imageHeight = image.height;
      this.imageWidth = image.width;
    };

    image.src = URL.createObjectURL(file);
}
```

----
**Credits: Leonardo Testa & Carlos Abreu**

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