No description
Find a file
2024-10-06 00:14:45 +13:00
built v1.0.0 2024-10-06 00:14:05 +13:00
src v1.0.0 2024-10-06 00:14:05 +13:00
test v1.0.0 2024-10-06 00:14:05 +13:00
.gitignore v1.0.0 2024-10-06 00:14:05 +13:00
.swcrc v1.0.0 2024-10-06 00:14:05 +13:00
jest.config.js v1.0.0 2024-10-06 00:14:05 +13:00
LICENSE Initial commit 2024-10-05 03:21:25 -07:00
package.json v1.0.0 2024-10-06 00:14:05 +13:00
pnpm-lock.yaml v1.0.0 2024-10-06 00:14:05 +13:00
README.md Updated readme 2024-10-06 00:14:45 +13:00
tsconfig.json v1.0.0 2024-10-06 00:14:05 +13:00

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