Updated readme

This commit is contained in:
Toastie (DCS Team) 2024-10-06 00:14:45 +13:00
parent 380d72830e
commit aea6f151fa
Signed by: toastie_t0ast
GPG key ID: 27F3B6855AFD40A4

View file

@ -1,2 +1,21 @@
# 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());
```