sharp-read-bmp/README.md

21 lines
540 B
Markdown
Raw Permalink Normal View History

2024-10-05 10:21:25 +00:00
# sharp-read-bmp
2024-10-05 11:14:45 +00:00
Function for reading bmp and ico and returning a sharp instance
2024-10-05 10:21:25 +00:00
2024-10-05 11:14:45 +00:00
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());
```