{
    "mode": "man",
    "parameter": "ppmtowinicon",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/ppmtowinicon/1/json",
    "generated": "2026-07-05T16:04:12Z",
    "synopsis": "ppmtowinicon [-andpgms] [-output output.ico] [ppmfiles...]",
    "sections": {
        "NAME": {
            "content": "ppmtowinicon - convert 1 or more portable pixmaps into a Windows .ico file\n\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "ppmtowinicon [-andpgms] [-output output.ico] [ppmfiles...]\n\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "Reads  one or more portable pixmaps as input.  Produces a Microsoft Windows .ico file as out‐\nput.\n\nA Windows icon contains 1 or more images, at different resolutions and color depths.\n\nMicrosoft recommends including at least the following formats in each icon  (size  and  bits-\nper-pixel):\n\n16 x 16 - 4 bpp\n\n32 x 32 - 4 bpp\n\n48 x 48 - 8 bpp\n\nDefault I/O is STDIN/STDOUT.\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "",
            "subsections": [
                {
                    "name": "-andpgms",
                    "content": "If this option is given, every second file is read as an \"and mask\" to be used by win‐\ndows for transparency data for the previous image. (These are set to fully  opaque  by\ndefault).  The  and  mask  is a PGM image, where any pixel with maxval intensity means\nopaque and any other pixel means not opaque. Note that as with  all  Netpbm  programs,\nyou may use a PBM file here and it will be used as if it were the equivalent PGM.\n\nThe  and  mask is like an alpha mask, except for what it signifies in the \"not opaque\"\nareas. In the usual case, the foreground image is black in those areas,  and  in  that\ncase  the areas are fully transparent -- the background shows through the icon. But in\ngeneral, a not opaque pixel signifies that the background  and  foreground  should  be\nmerged  as  follows:  The  intensities  of the color components in the forgeground and\nbackground are represented as binary numbers, then corresponding  bits  of  the  back‐\nground  and  foreground intensities are exlusive-or'ed together. So there is a sort of\nreverse video effect.\n\n"
                },
                {
                    "name": "-output output.ico",
                    "content": "File to write.  By default, the icon is written to stdout.\n\n"
                }
            ]
        },
        "SEE ALSO": {
            "content": "winicontoppm(1), ppm(5)\n\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "Copyright (C) 2000 by Lee Benfield.\n\n\n\n22 May 2000                             ppmtowinicon(1)",
            "subsections": []
        }
    },
    "summary": "ppmtowinicon - convert 1 or more portable pixmaps into a Windows .ico file",
    "flags": [
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "If this option is given, every second file is read as an \"and mask\" to be used by win‐ dows for transparency data for the previous image. (These are set to fully opaque by default). The and mask is a PGM image, where any pixel with maxval intensity means opaque and any other pixel means not opaque. Note that as with all Netpbm programs, you may use a PBM file here and it will be used as if it were the equivalent PGM. The and mask is like an alpha mask, except for what it signifies in the \"not opaque\" areas. In the usual case, the foreground image is black in those areas, and in that case the areas are fully transparent -- the background shows through the icon. But in general, a not opaque pixel signifies that the background and foreground should be merged as follows: The intensities of the color components in the forgeground and background are represented as binary numbers, then corresponding bits of the back‐ ground and foreground intensities are exlusive-or'ed together. So there is a sort of reverse video effect."
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "File to write. By default, the icon is written to stdout."
        }
    ],
    "examples": [],
    "see_also": [
        {
            "name": "winicontoppm",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/winicontoppm/1/json"
        },
        {
            "name": "ppm",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/ppm/5/json"
        }
    ],
    "tldr": {
        "source": "official",
        "description": "This command has been superseded by `pamtowinicon`.",
        "examples": [
            {
                "description": "View documentation for the current command",
                "command": "tldr pamtowinicon"
            }
        ]
    }
}