UNPKG

ico-utils

Version:

A javascript library to create ICO file from PNG images and extract PNG images from ICO file.

7 lines (6 loc) 258 B
export function getBlob(image, mime = 'image/png') { return image instanceof Blob ? image : new Blob([image], { type: mime }); } export async function getArrayBuffer(image) { return image instanceof ArrayBuffer ? image : await image.arrayBuffer(); }