From aea6f151fad73685ebb0dbba23664b536cf00207 Mon Sep 17 00:00:00 2001 From: Toastie Date: Sun, 6 Oct 2024 00:14:45 +1300 Subject: [PATCH] Updated readme --- README.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/README.md b/README.md index cacbfc0..bef2cfe 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,21 @@ # sharp-read-bmp +Function for reading bmp and ico and returning a sharp instance +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()); +``` \ No newline at end of file