{
    "mode": "man",
    "parameter": "xpmtoppm",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/xpmtoppm/1/json",
    "generated": "2026-10-22T10:21:51Z",
    "synopsis": "",
    "sections": {
        "NAME": {
            "content": "xpmtoppm - convert an X11 pixmap to a PPM image\n\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "",
            "subsections": [
                {
                    "name": "xpmtoppm",
                    "content": "[--alphaout={alpha-filename,-}] [-verbose]\n\n[xpmfile]\n\n"
                }
            ]
        },
        "DESCRIPTION": {
            "content": "This program is part of Netpbm(1).\n\nxpbtoppm  reads  an X11 pixmap (XPM version 1 or 3) as input and produces a PPM image as out‐\nput.\n\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "In addition to the options common to all programs based on libnetpbm  (most  notably  -quiet,\nsee  Common Options ), xpmtoppm recognizes the following command line options:\n\n\n\n--alphaout=alpha-filename\nxpmtoppm  creates  a  PBM file containing the transparency mask for the image.  If the\ninput image doesn't contain transparency information, the alpha-filename file contains\nall white (opaque) transparency values.  If you  don't  specify  --alphaout,  xpmtoppm\ndoes  not generate a transparency file, and if the input image has transparency infor‐\nmation, xpmtoppm simply discards it.\n\nIf you specify - as the filename, xpmtoppm writes the transparency output to  Standard\nOutput and discards the image.\n\nSee pamcomp(1) for one way to use the transparency output file.\n\nxpmtoppm  can't handle a line longer than 8K characters in the XPM input.  If an input\nline exceeds this limit, xpmtoppm quits with an error message to that effect.   Before\nNetpbm 10.30 (October 2005), the limit was 2K.\n\n",
            "subsections": [
                {
                    "name": "--verbose",
                    "content": "xpmtoppm prints information about its processing on Standard Error.\n\n\n\n",
                    "long": "--verbose"
                }
            ]
        },
        "LIMITATIONS": {
            "content": "xpmtoppm  recognizes  only a limited set of the features of XPM Version 3; i.e. it rejects as\ninvalid many valid XPM images.\n\nThe only place a comment block is valid is starting in Column 1 of the line immediately after\n\"static char ...\".\n\nIn addition, ppmtoxpm properly recognizes any single-line comment that begins in Column 1  in\nthe color table part of the file.\n\nThere must be for every pixel a default colorname for a color type visual.\n\nBefore Netpbm 10.58 (March 2012), zero bytes per pixel causes the program to fail with a mes‐\nsage about premature EOF on input.\n\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "ppmtoxpm(1), pamcomp(1), ppm(1)\n\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "Copyright (C) 1991 by Jef Poskanzer.\n\nUpgraded to work with XPM version 3 by Arnaud Le Hors<lehors@mirsa.inria.fr>, Tue Apr 9 1991.\n",
            "subsections": []
        },
        "DOCUMENT SOURCE": {
            "content": "This  manual  page  was  generated by the Netpbm tool 'makeman' from HTML source.  The master\ndocumentation is at\n\nhttp://netpbm.sourceforge.net/doc/xpmtoppm.html\n\nnetpbm documentation                      31 December 2011                   Xpmtoppm User Manual(1)",
            "subsections": []
        }
    },
    "summary": "xpmtoppm - convert an X11 pixmap to a PPM image",
    "flags": [
        {
            "flag": "",
            "long": "--verbose",
            "arg": null,
            "description": "xpmtoppm prints information about its processing on Standard Error."
        }
    ],
    "examples": [],
    "see_also": [
        {
            "name": "ppmtoxpm",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/ppmtoxpm/1/json"
        },
        {
            "name": "pamcomp",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/pamcomp/1/json"
        },
        {
            "name": "ppm",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/ppm/1/json"
        }
    ],
    "tldr": {
        "source": "official",
        "description": "Convert an X11 pixmap to a PPM image.",
        "examples": [
            {
                "description": "Convert an XPM image to a PPM image",
                "command": "xpmtoppm {{path/to/input_file.xpm}} > {{path/to/output_file.ppm}}"
            },
            {
                "description": "Store the transparency mask of the input image in the specified file",
                "command": "xpmtoppm {{-a|--alphaout}} {{path/to/alpha_file.pbm}} {{path/to/input_file.xpm}} > {{path/to/output_file.ppm}}"
            }
        ]
    }
}