No description
| src | ||
| test | ||
| .gitignore | ||
| eslint.config.js | ||
| LICENSE | ||
| package.json | ||
| pnpm-lock.yaml | ||
| README.md | ||
| tsconfig.json | ||
sharp-read-bmp
Function for reading bmp and ico and returning a sharp instance
Installation
npm install @valkyrie-dev/sharp-read-bmp
Usage
import { sharpBmp } from '@valkyrie-dev/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());