# jpeg-compressor

> compress bmp to jpeg

Latest version **1.0.0** (published 2019-04-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install jpeg-compressor
pnpm add jpeg-compressor
yarn add jpeg-compressor
bun add jpeg-compressor
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2019-04-17 |
| First published | 2019-04-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 1.6 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | upupming |
| Maintainers | upupming |
| Keywords | jpeg, compression |

## Links

- npm: https://www.npmjs.com/package/jpeg-compressor
- Repository: https://github.com/upupming/jpeg-compressor
- Homepage: https://github.com/upupming/jpeg-compressor#readme
- Issues: https://github.com/upupming/jpeg-compressor/issues
- npm.io page: https://npm.io/package/jpeg-compressor

## Dependencies (1)

- [bmp-js](https://npm.io/package/bmp-js.md) ^0.1.0

## Alternatives

- [lodash.startswith](https://npm.io/package/lodash.startswith.md) — 769.7K weekly downloads
- [@tarojs/service](https://npm.io/package/@tarojs/service.md) — 33.9K weekly downloads
- [io.extendreality.tilia.indicators.spatialtargets.unity](https://npm.io/package/io.extendreality.tilia.indicators.spatialtargets.unity.md) — 131 weekly downloads
- [@rtarojs/taro](https://npm.io/package/@rtarojs/taro.md) — 90 weekly downloads
- [node-branch-io](https://npm.io/package/node-branch-io.md) — 50 weekly downloads

## Recent versions

- 1.0.0 (latest) — 2019-04-17

## README

# jpeg-compressor

<a href="https://www.npmjs.com/package/jpeg-compressor"><img src="https://img.shields.io/npm/v/jpeg-compressor.svg?style=flat-square" alt="npm"></a>
<a href="https://coveralls.io/github/upupming/jpeg-compressor?branch=master"><img src="https://img.shields.io/coveralls/github/upupming/jpeg-compressor.svg?style=flat-square" alt="Coveralls"></a>
<a href="https://travis-ci.com/upupming/jpeg-compressor/builds"><img src="https://img.shields.io/travis/com/upupming/jpeg-compressor.svg?style=popout-square" alt="travis build status"></a>
<a href="https://github.com/upupming/jpeg-compressor/blob/master/LICENSE"><img src="https://img.shields.io/github/license/mashape/apistatus.svg?style=popout-square" alt="License"></a>

This is a implementation of jpeg compressor.

## Installation

```bash
npm install jpeg-compressor
```

## Usage

```js
const JpegEncoder = require('../dist/index')
const encoder = new JpegEncoder();
encoder.readFromBMP('/xxx/xxx.bmp');
encoder.encodeToJPG('/xxx/xxx.jpg', 50);
```

## Performance

| Original bmp    | Compressed jpg | Compression ratio | Time used|
| --------------- | -------------- | ----------------- |----|
| 1,440,054 bytes | 68,888 bytes   | 0.047,8           |3,843ms|

This project is for education only, and it's my lab homework at Harbin Institute of Technology, if you would like to use it in your project, please fork and try to improve its performance as you like.

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