Updated readme
This commit is contained in:
parent
380d72830e
commit
aea6f151fa
1 changed files with 19 additions and 0 deletions
19
README.md
19
README.md
|
@ -1,2 +1,21 @@
|
||||||
# sharp-read-bmp
|
# sharp-read-bmp
|
||||||
|
Function for reading bmp and ico and returning a sharp instance
|
||||||
|
|
||||||
|
Installation
|
||||||
|
----------------------------------------------------------------
|
||||||
|
```
|
||||||
|
npm install @valkyriecoms/sharp-read-bmp
|
||||||
|
```
|
||||||
|
|
||||||
|
Usage
|
||||||
|
----------------------------------------------------------------
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
import { sharpBmp } from 'sharp-read-bmp';
|
||||||
|
import { fileTypeFromFile } from 'file-type';
|
||||||
|
|
||||||
|
const { mime } = await fileTypeFromFile('favicon.ico');
|
||||||
|
const sharpCtx = await sharpBmp('favicon.ico', mime);
|
||||||
|
|
||||||
|
console.log(await sharpCtx.metadata());
|
||||||
|
```
|
Loading…
Reference in a new issue