This package has been deprecated

Author message:

Please use image-size

ico-size
TypeScript icon, indicating that this package has built-in type declarations

2.0.0 • Public • Published

ico-size

npm GitHub license

A module to get dimensions of ico/cur files

Install

npm install --save ico-size
# or 
yarn add ico-size

Usage

import * as https from 'https'
import { icoSizeOf } from 'ico-size'
 
https.get('https://www.google.com/favicon.ico', res => {
  const chunks = []
  res
  .on('data', chunk => chunks.push(chunk))
  .on('end', () => {
    const buffer = Buffer.concat(chunks)
    console.log(icoSizeOf(buffer)) // { width: 16, height: 16 }
  })
})

API

function icoSizeOf(buffer: ArrayBuffer): { width: number, height: number }

Readme

Keywords

none

Package Sidebar

Install

npm i ico-size

Weekly Downloads

32

Version

2.0.0

License

MIT

Unpacked Size

8.81 kB

Total Files

17

Last publish

Collaborators

  • black_glory