Search by

An easy-to-use library to generate valid ICO files.

Package info

github.com/company4-dev/ico

pkg:composer/company4-dev/ico

Statistics

Installs: 32

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

1.8 2026-11-16 18:10 UTC

This package is auto-updated.

Last update: 2026-11-16 18:11:02 UTC


README

ICO allows you to generate .ico files from pre-existing images.

Installation

composer require company4-dev/ico

Usage

Set-up the ICO

Parameter Type Default Description
$in string null The path to the source image file
$out string null Path to the target ICO file, if null, the file will be saved to the same location, but with a .ico extension.
$sizes array [] An array of sizes that the source image should be rendered at in the generated ICO file. If sizes are not supplied, sizes 16px2, 24px2, 32px2, 48px2, 256px2 will be used.
use Company4\Ico\Ico;

$ico = new ICO(
    $path,
    [
        [16, 16],
        [32, 32],
        [48, 48],
        [64, 64],
    ]
);

$ico->save($target);

With Thanks

Credit to Chris Jean who can take credit for base of the src/ico.php file.