Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

apple-icns

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

apple-icns

Apple IconSet (.icns) file format

  • 0.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
91
decreased by-5.21%
Maintainers
1
Weekly downloads
 
Created
Source

apple-icns

npm npm license npm downloads build status

Apple IconSet (.icns) file format

Install via npm

$ npm install --save apple-icns

TODO

  • TOC & icnV resource types
  • extraction (dumping raw jpeg/png, and decompress and combine for raw)
  • creation
  • addition

Usage

var Icns = require( 'apple-icns' )

Opening an icon set

var iconset = new Icns( filename )

iconset.open( function( error ) {
  console.log( 'iconset', error || iconset )
})
console.log( iconset.entries )
[
  IconEntry {
    type: 'is32',
    length: 774,
    offset: 8,
    width: 16,
    height: 16,
    depth: 24,
    channels: 3,
    format: 'raw',
    isMask: false,
    isCompressed: true,
    description: '16×16 24-bit icon',
    osVersion: '8.5',
    uncompressedSize: 2304
  },
  // ... More entries omitted for brevity ...
  IconEntry {
    type: 'ic09',
    length: 158264,
    offset: 134167,
    width: 512,
    height: 512,
    depth: -1,
    channels: -1,
    format: 'jpeg2000',
    isMask: false,
    isCompressed: false,
    description: '512×512 icon in JPEG 2000 or PNG format',
    osVersion: '10.5',
    uncompressedSize: null
  }
]

Reading an icon

iconset.readEntryData( iconset.entries[3], function( error, buffer ) {
  console.log( 'Icon', error || buffer )
})

References

Keywords

FAQs

Package last updated on 24 Feb 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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