generate iconFont
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
unknown 0073d80258 Upload final project of fonIcon 2 years ago
..
lib Upload final project of fonIcon 2 years ago
src Upload final project of fonIcon 2 years ago
LICENSE Upload final project of fonIcon 2 years ago
README.md Upload final project of fonIcon 2 years ago
package.json Upload final project of fonIcon 2 years ago

README.md

Image To URI

NPM Downloads Build & Test npm version Coverage Status

Convert image file to data URI. Support .png,.gif,.jpg,.jpeg,.bm,.bmp,.webp,.ico,.svg.

Install

npm i image2uri

Basic Usage

import image2uri from "image2uri";

console.log(image2uri('./example.bmp'));
// data:image/bmp;base64,Qk0YCAAAAAAAADYAAAAoAAAAGAAAABwAAAABABgAAAAAAOIHAAA....
console.log(image2uri('./example.jpg'));
// data:image/jpeg;base64,Qk0YCAAAAAAAADYAAAAoAAAAGAAAABwAAAABABgAAAAAAOIHAAA....

Development

npm run watch # Listen compile .ts files.
npm run build # compile .ts files.

npm run start