sharp-read-bmp/README.md
2024-10-06 00:14:45 +13:00

540 B

sharp-read-bmp

Function for reading bmp and ico and returning a sharp instance

Installation

npm install @valkyriecoms/sharp-read-bmp

Usage

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());