open-index/open-npm huggingface dataset:
npm package: @igoodie/paper-editor
Description: >
Author: iGoodie
Latest version: 0.7.5

# paper-editor

> 

[![NPM](https://img.shields.io/npm/v/paper-editor.svg)](https://www.npmjs.com/package/paper-editor) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)

## Install

```bash
npm install --save paper-editor
```

## Usage

```tsx
import React, { Component } from 'react'

import MyComponent from 'paper-editor'
import 'paper-editor/dist/index.css'

class Example extends Component {
  render() {
    return <MyComponent />
  }
}
```

## License

MIT © [iGoodie](https://github.com/iGoodie)
npm package: @igor-arkhipov/ico-convert
Description: Convert Image to ICO file format (fork)
Author: igor-arkhipov
Latest version: 0.0.13

# ico-convert

![badge](https://github.com/igor-arkhipov/ico-convert/workflows/Node.js%20Package/badge.svg)

> Convert Image to [ICO file format](<https://en.wikipedia.org/wiki/ICO_(file_format)>).

## Installation

```bash
npm install @igor-arkhipov/ico-convert
```

## Usage

```js
import fs from 'fs'
import { convert } from '@igor-arkhipov/ico-convert'

const buf = fs.readFileSync('input.png') // image must be squre, 256x256 pixels or larger
convert(buf).then((data) => {
  fs.writeFileSync('output.ico', data)
})
```

### Specify image for each size

```js
const bufs = [
  fs.readFileSync('16x16.png'),
  fs.readFileSync('24x24.png'),
  fs.readFileSync('32x32.png'),
  fs.readFileSync('48x48.png'),
  fs.readFileSync('64x64.png'),
  fs.readFileSync('128x128.png'),
  fs.readFileSync('256x256.png'),
]
convert(bufs).then((data) => {
  fs.writeFileSync('output.ico', data)
})
```

## CLI

```bash
npm install -g @igor-arkhipov/ico-convert
ico-convert icon.png
```

or use via npx

```bash
npx @igor-arkhipov/ico-convert icon.png
```
npm package: @igor-arkhipov/ico-convert-fork
Description: Convert Image to ICO file format (fork)
Author: igor-arkhipov
Latest version: 0.0.15

# ico-convert

![badge](https://github.com/igor-arkhipov/ico-convert/workflows/Node.js%20Package/badge.svg)

> Convert Image to [ICO file format](<https://en.wikipedia.org/wiki/ICO_(file_format)>).

## Installation

```bash
npm install @igor-arkhipov/ico-convert
```

## Usage

```js
import fs from 'fs'
import { convert } from '@igor-arkhipov/ico-convert'

const buf = fs.readFileSync('input.png') // image must be squre, 256x256 pixels or larger
convert(buf).then((data) => {
  fs.writeFileSync('output.ico', data)
})
```

### Specify image for each size

```js
const bufs = [
  fs.readFileSync('16x16.png'),
  fs.readFileSync('24x24.png'),
  fs.readFileSync('32x32.png'),
  fs.readFileSync('48x48.png'),
  fs.readFileSync('64x64.png'),
  fs.readFileSync('128x128.png'),
  fs.readFileSync('256x256.png'),
]
convert(bufs).then((data) => {
  fs.writeFileSync('output.ico', data)
})
```

## CLI

```bash
npm install -g @igor-arkhipov/ico-convert
ico-convert icon.png
```

or use via npx

```bash
npx @igor-arkhipov/ico-convert icon.png
```
npm package: @igor-arkhipov/ico-fork
Description: ICO file format parser and builder(fork)
Author: igor-arkhipov
Latest version: 0.0.7

<!-- markdownlint-disable MD024 -->

# ico

![badge](https://github.com/igor-arkhipov/ico/workflows/Node.js%20Package/badge.svg)

> [ICO file format](<https://en.wikipedia.org/wiki/ICO_(file_format)>) parser and builder.

## Installation

```bash
npm install @igor-arkhipov/ico
```

## Usage

### Parsing

```js
import fs from 'fs'
import { Ico } from '@igor-arkhipov/ico'

const buf = fs.readFileSync('icon.ico')
const ico = Ico.from(buf)
console.log(ico.fileHeader) // IcoFileHeader { reserved: 0, type: 1, count: 7 }
console.log(ico.infoHeaders[0]) // IcoInfoHeader { width: 16, height: 16, ... }
```

### Building

```js
import fs from 'fs'
import { Ico, IcoImage } from '@igor-arkhipov/ico'

const ico = new Ico()
let buf

buf = fs.readFileSync('128x128.png')
image = IcoImage.fromPNG(buf)
ico.append(image)

buf = fs.readFileSync('256x256.png')
image = IcoImage.fromPNG(buf)
ico.append(image)

/* Some other PNG files */

fs.writeFileSync('icon.ico', ico.data)
```

## API

### Class: Ico

#### static from(buffer)

Create ICO from the icon buffer.

##### buffer

Type: `Buffer`

The ICO icon buffer.

#### append(image)

Adds ICO image at the end.

##### image

Type: `IcoImage`

The ICO Image to append.

#### insert(image, index)

Inserts ICO image at the specified position.

##### image

Type: `IcoImage`

The ICO Image to insert.

##### index

Type: `number`

The position at which to insert the ICO Image.

#### remove(index)

Removes ICO image at the specified position.

##### index

Type: `number`

The position of the ICO Image to remove.

#### fileHeader

Type: `IcoFileHeader`

Return the file header on the ICO.

#### infoHeaders

Type: `IcoInfoHeader[]`

Return the ICO info header on the ICO.

#### images

Type: `IcoImage[]`

Return the ICO images on the ICO.

#### data

Type: `Buffer`

Return the ICO buffer.

### Class: IcoImage

#### static from(buffer)

Create ICO image from the buffer.

##### buffer

Type: `Buffer`

The ICO image buffer.

#### static fromPNG(buffer)

Create ICO Image from the PNG image buffer.

##### buffer

Type: `Buffer`

The PNG image buffer.

### Class: IcoInfoHeader

#### static from(buffer)

Create ICO info header from the buffer.

##### buffer

Type: `Buffer`

The ICO info header buffer.

### Class: IcoFileHeader

#### static from(buffer)

Create ICO file header from the buffer.

##### buffer

Type: `Buffer`

The ICO file header buffer.

## Specifications

### Supported Size

| Size    |
| ------- |
| 16x16   |
| 24x24   |
| 32x32   |
| 48x48   |
| 64x64   |
| 128x128 |
| 256x256 |