Socket
Socket
Sign inDemoInstall

decode-ico

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

decode-ico - npm Package Compare versions

Comparing version 0.3.1 to 0.4.0

14

index.d.ts

@@ -0,1 +1,3 @@

import ImageData = require('@canvas/image-data')
declare interface Hotspot {

@@ -6,13 +8,19 @@ x: number

declare interface ImageData {
declare interface BmpData extends ImageData {
bpp: number
hotspot: Hotspot | null
type: 'bmp'
}
declare interface PngData {
bpp: number
data: Uint8Array
height: number
hotspot: Hotspot | null
type: 'bmp' | 'png'
type: 'png'
width: number
}
declare function decodeIco (source: ArrayBuffer | Uint8Array): ImageData[]
declare function decodeIco (source: ArrayBuffer | Int8Array | Uint8Array | Uint8ClampedArray): (BmpData | PngData)[]
export = decodeIco
const toDataView = require('to-data-view')
const decodeBmp = require('decode-bmp')
const ImageData = require('@canvas/image-data')

@@ -76,12 +77,6 @@ function isPng (view, offset) {

const bmp = decodeBmp(data, { width, height, icon: true })
const info = { bpp: bmp.colorDepth, hotspot, type: 'bmp' }
return {
bpp: bmp.colorDepth,
data: bmp.data,
height: bmp.height,
hotspot,
type: 'bmp',
width: bmp.width
}
return Object.assign(new ImageData(bmp.data, bmp.width, bmp.height), info)
})
}
{
"name": "decode-ico",
"version": "0.3.1",
"version": "0.4.0",
"license": "MIT",

@@ -14,14 +14,15 @@ "repository": "LinusU/decode-ico",

"dependencies": {
"decode-bmp": "^0.1.0",
"to-data-view": "^1.0.0"
"@canvas/image-data": "^1.0.0",
"decode-bmp": "^0.2.0",
"to-data-view": "^1.1.0"
},
"devDependencies": {
"globby": "^8.0.1",
"lodepng": "^1.1.0",
"mocha": "^5.2.0",
"standard": "^11.0.1"
"globby": "^10.0.1",
"lodepng": "^2.0.0",
"mocha": "^6.2.2",
"standard": "^14.3.1"
},
"engines": {
"node": ">=6"
"node": ">=8.6"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc