# react-native-wtfssd-imagecompress

> 图片压缩组件

Latest version **1.0.0** (published 2018-01-16) · ISC license · 0 weekly downloads

## Install

```sh
npm install react-native-wtfssd-imagecompress
pnpm add react-native-wtfssd-imagecompress
yarn add react-native-wtfssd-imagecompress
bun add react-native-wtfssd-imagecompress
```

## 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.0.0 |
| Published | 2018-01-16 |
| First published | 2018-01-16 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | wtfssd |
| Maintainers | wtfssd |
| Keywords | reat-native, reactnative, 图片压缩 |

## Links

- npm: https://www.npmjs.com/package/react-native-wtfssd-imagecompress
- Repository: https://github.com/WTFSSD/react-native-wtfssd-imagecompress
- Homepage: https://github.com/WTFSSD/react-native-wtfssd-imagecompress#readme
- Issues: https://github.com/WTFSSD/react-native-wtfssd-imagecompress/issues
- npm.io page: https://npm.io/package/react-native-wtfssd-imagecompress

## Recent versions

- 1.0.0 (latest) — 2018-01-16

## README

# react-native-wtfssd-imagecompress
## a react-native tool to compress image
# install 
- `npm install react-native-wtfssd-imagecompress --save`
# link
- `react-native link  react-native-wtfssd-imagecompress`

# usage

```
import ImageCompress from 'react-native-wtfssd-imagecompress';

ImageCompress.compress(imageurl,size).then(response => {
    console.log('success',response);
}).catch(e => {
    console.log('error', e);
});

```

### paramlist
- `imageUrl` the url of image
- `size` expect size of compress (unit:kb)

### response contained the follow fields
 - `data` the `base64` string
 - `fileName` the name of image(unit:B)
 - `size` the compressed size of image 
 - `origin` the origin url of image                                       
 - `originSize` the size of origin image (unit:B)

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