1.1.3 • Published 6 months ago

@types/to-ico v1.1.3

Weekly downloads
1,182
License
MIT
Repository
github
Last release
6 months ago

Installation

npm install --save @types/to-ico

Summary

This package contains type definitions for to-ico (https://github.com/kevva/to-ico#readme).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/to-ico.

index.d.ts

// Type definitions for to-ico 1.1
// Project: https://github.com/kevva/to-ico#readme
// Definitions by: Remco Haszing <https://github.com/remcohaszing>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

/// <reference types="node" />

/**
 * Convert PNG to ICO in memory
 *
 * @param input Array of PNG image buffers.
 *
 * The images must have a size of `16x16`, `24x24`, `32x32`, `48x48`, `64x64`, `128x128` or `256x256` and they must
 * have an 8 bit per sample (channel) bit-depth (on Unix you can check this with the `file` command: RGB(A) is
 * supported, while [colormap](https://en.wikipedia.org/wiki/Indexed_color) is not, because it's 8 bits per pixel
 * instead of 8 bits per channel, which is 24 or 32 bits per pixel depending on the presence of the alpha channel).
 * These are limitations in the underlying [`pngjs`](https://github.com/lukeapage/pngjs#pngjs) library. If you have a
 * colormap PNG you can convert it to an RGB/RGBA PNG with commonly used image editing tools.
 */
declare function toIco(input: string | Buffer | Array<string | Buffer>, options?: toIco.ToIcoOptions): Promise<Buffer>;

// eslint-disable-next-line no-redeclare
declare namespace toIco {
    interface ToIcoOptions {
        /**
         * Use the largest image and resize to sizes defined using the [sizes](#sizes) option.
         *
         * @default false
         */
        resize?: boolean | undefined;

        /**
         * Array of sizes to use when resizing.
         *
         * @default [16, 24, 32, 48, 64, 128, 256]
         */
        sizes?: number[] | undefined;
    }
}

export = toIco;

Additional Details

  • Last updated: Fri, 02 Jul 2021 19:37:11 GMT
  • Dependencies: @types/node
  • Global values: none

Credits

These definitions were written by Remco Haszing.

1.1.3

6 months ago

1.1.2

7 months ago

1.1.1

3 years ago

1.1.0

4 years ago