{
    "mode": "man",
    "parameter": "pnmtoddif",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/pnmtoddif/1/json",
    "generated": "2026-06-03T03:35:11Z",
    "sections": {
        "Name": {
            "content": "pnmtoddif - Convert a portable anymap to DDIF format\n",
            "subsections": []
        },
        "Syntax": {
            "content": "pnmtoddif pnmtoddif [-resolution x y] [pnmfile [ddiffile]]\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "resolution x y The  horizontal  and vertical resolution of the output image in dots per inch.\nDefaults to 78 dpi.\n\npnmfile        The filename for the image file in pnm format.  If this argument  is  omitted,\ninput is read from stdin.\n\nddiffile       The  filename  for the image file to be created in DDIF format.  If this argu‐\nment is omitted, the ddiffile is written to standard output. It can only spec‐\nified if a pnmfile is also specified.\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "pnmtoddif  takes a portable anymap from standard input and converts it into a DDIF image file\non standard output or the specified DDIF file.\n\npbm format (bitmap) data is written as 1 bit DDIF, pgm  format  data  (greyscale)  as  8  bit\ngreyscale  DDIF, and ppm format data is written as 8,8,8 bit color DDIF. All DDIF image files\nare written as uncompressed. The data plane organization is interleaved by pixel.\n\nIn addition to the number of pixels in the width and height dimension, DDIF images also carry\ninformation  about  the  size  that the image should have, that is, the physical space that a\npixel occupies. PBMPLUS images do not carry this information, hence it has to  be  externally\nsupplied.   The default of 78 dpi has the beneficial property of not causing a resize on most\nDigital Equipment Corporation color monitors.\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "Burkhard Neidecker-Lutz\nDigital Equipment Corporation, CEC Karlsruhe\nneideck@nestvx.enet.dec.com\n\n\n\npnmtoddif(1)",
            "subsections": []
        }
    },
    "flags": [],
    "examples": [],
    "see_also": [],
    "tldr": {
        "source": "official",
        "description": "Convert a PNM image to a DDIF image file.",
        "examples": [
            {
                "description": "Convert a PNM image to a DDIF image file",
                "command": "pnmtoddif {{path/to/image.pnm}} > {{path/to/image.ddif}}"
            },
            {
                "description": "Explicitly specify the horizontal and vertical resolution of the output image",
                "command": "pnmtoddif {{-r|-resolution}} {{horizontal_dpi}} {{vertical_dpi}} {{path/to/image.pnm}} > {{path/to/image.ddif}}"
            }
        ]
    }
}