An open API service indexing awesome lists of open source software.

https://github.com/deptno/image-splitter

✄ split image from stream
https://github.com/deptno/image-splitter

Last synced: 8 months ago
JSON representation

✄ split image from stream

Awesome Lists containing this project

README

          

# image-splitter
[![npm](https://img.shields.io/npm/dt/image-splitter.svg?style=for-the-badge)](https://www.npmjs.com/package/image-splitter)

## install

```bash
npm install --save image-splitter

```

## api

> splitIfWidthBiggerThenHeight: (ext: string, stream: NodeJS.ReadableStream, rightFirst?: boolean) => Promise;

```typescript
import {splitIfWidthBiggerThenHeight} from 'image-splitter';

axios({url: 'https://image.url.jpg', responseType: 'stream'})
.then(response => splitIfWidthBiggerThenHeight('.jpg', response.data));
```