No description
Find a file
2024-10-06 14:11:46 +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 Removed the badge, it did not work :( 2024-10-06 14:02:57 +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());