2ico 中文文档教程
2ico
从画布生成 ICO。 参见 [Demo]()
Installation
npm install 2ico
Usage
import toICO from '2ico';
toICO(canvas, [16, 32, 48]); // data:image/x-icon;base64, ...
Parameters
- canvas (
HTMLCanvasElement
): The canvas element. - sizes (
number[]
): The sizes of images in ico. (default: [16, 32, 48])
Returns
- Data URIs (
string
): the ico Data URIs.
const elCanvas = document.getElementById('canvas-id');
const result = toICO(
elCanvas,
[16, 32, 48]
);
console.log(result); // data:image/x-icon;base64, ...
LICENSE
2ico
Generate ICO from canvas. see [Demo]()
Installation
npm install 2ico
Usage
import toICO from '2ico';
toICO(canvas, [16, 32, 48]); // data:image/x-icon;base64, ...
Parameters
- canvas (
HTMLCanvasElement
): The canvas element. - sizes (
number[]
): The sizes of images in ico. (default: [16, 32, 48])
Returns
- Data URIs (
string
): the ico Data URIs.
const elCanvas = document.getElementById('canvas-id');
const result = toICO(
elCanvas,
[16, 32, 48]
);
console.log(result); // data:image/x-icon;base64, ...
LICENSE
更多
你可能也喜欢
- 2way-router 中文文档教程
- @0655-dev/typescript-package-template 中文文档教程
- @211la/cs-share-widget 中文文档教程
- @36node/jest-runner-newman 中文文档教程
- @3boysdad/serverless-plugin-typescript 中文文档教程
- @4c/docusaurus-preset 中文文档教程
- @4geit/rct-broadcast-message-component 中文文档教程
- @a-mehrabi/aranode-amqp-client 中文文档教程
- @a11ygato/audit-engine 中文文档教程
- @aacc/ginit 中文文档教程