Trim an ICO to the sizes you need
Admin ·
A Windows ICO can hold several drawings or resolutions in one file. Keep the embedded variants your destination needs and measure how much of the file each choice removes.
Read the size and encoding of each entry
Click Load example to open the two-size beacon icon. The source contains two separate image payloads. A directory entry lists the stored image dimensions, encoding and byte count.
| Entry | Embedded size | Payload |
|---|---|---|
| 1 | 16 × 16 | 872-byte DIB |
| 2 | 32 × 32 | 241-byte PNG |
Microsoft, the ICO header and directoryMicrosoft, PNG images in ICO files
Keep the 32-pixel drawing
Clear Entry 1 and leave Entry 2 selected. Click Trim icon. The status shows one of two entries kept and 1,151 → 263 bytes. The 888 bytes saved cover the 872-byte DIB and its 16-byte directory entry.
Check the preview and select Download ICO. The 241-byte PNG is copied into the new icon with the same pixel data. Its directory offset now points just after the six-byte file header and one directory entry.
Microsoft, the ICO header and directoryMicrosoft, PNG images in ICO files
Pick the variants your destination will display
A larger embedded image can take less space than a smaller one when the formats differ. For example, keeping only Entry 1 yields 894 bytes because the smaller drawing is stored as a DIB.
Check for separate 16-, 32- or 48-pixel requirements before removing sizes. Windows can use different variants as the display context changes. If two entries share a size, compare their bit depths and encodings before choosing a variant.
Common questions
What does the compressor change in the retained entry?
It preserves the original image payload and updates its directory position. Pixels, masks and PNG payload data stay in the retained byte sequence.
What if the destination needs every size?
Keep all entries and the download contains the original bytes. Use Favicon Generator if the source needs a different set of sizes.