# rust-image-processing

> ## 🚴 Usage

Latest version **0.1.0** (published 2022-04-23) · 0 weekly downloads

## Install

```sh
npm install rust-image-processing
pnpm add rust-image-processing
yarn add rust-image-processing
bun add rust-image-processing
```

## Health

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

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2022-04-23 |
| First published | 2022-04-23 |
| Weekly downloads | 0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 359.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | mfeckie |

## Links

- npm: https://www.npmjs.com/package/rust-image-processing
- npm.io page: https://npm.io/package/rust-image-processing

## Recent versions

- 0.1.0 (latest) — 2022-04-23

## README

## About

## 🚴 Usage

Example using directly as a `module` in modern browsers

```html
  <script type="module">
    async function loadResizer() {
      const lib = await import('./pkg/rust_image_processing.js')
      await lib.default()
      return lib.resize_image
    }

    async function loadImage() {
      const image = await fetch("sample.png")
      return image.arrayBuffer()
    }

    const resize_image = await loadResizer()

    const buffer = await loadImage()

    const u8buf = new Uint8ClampedArray(buffer)

    const result = resize_image(u8buf, 256, 256)

    const img = document.createElement('img')
    img.src = URL.createObjectURL(new Blob([result.buffer]), { type: "image/jpeg" })
    document.querySelector('body').appendChild(img)
  </script>
```

### 🛠️ Build with `wasm-pack build`

This library is designed for use in web browsers, so building is targetted to `web`.  

```
wasm-pack build --target web
```

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