{
    "mode": "man",
    "parameter": "anytopnm",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/anytopnm/1/json",
    "generated": "2026-08-07T15:23:53Z",
    "synopsis": "anytopnm [file]",
    "sections": {
        "NAME": {
            "content": "anytopnm - convert an arbitrary type of image file to PBM, PGM, or PPM\n\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "anytopnm [file]\n\n\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "This program is part of Netpbm(1).\n\nanytopnm converts the input image, which may be in any of about 100 graphics formats, to PBM,\nPGM,  or  PPM format, depending on that nature of the input image, and outputs it to Standard\nOutput.\n\nTo determine the format of the input, anytopnm uses the file program  (possibly  assisted  by\nthe  magic numbers file fragment included with Netpbm). If that fails (very few image formats\nhave magic numbers), anytopnm looks at the  filename  extension.   If  that  fails,  anytopnm\npunts.\n\nThe type of the output file depends on the input image.\n\nanytopnm  uses the converters for particular graphics formats that are in the Netpbm package,\nso it can't convert any format that you couldn't convert  with  some  other  Netpbm  program.\nWhat  anytopnm  adds is the ability to recognize the format and choose the appropriate Netpbm\nprogram to convert it.  For example, if you invoke anytopnm on a GIF file, anytopnm will rec‐\nognize that it is a GIF file and therefore giftopnm knows how to convert it to PNM,  so  any‐\ntopnm invokes giftopnm.\n\nanytopnm cannot recognize every possible input format, so you may still be able to convert an\nimage with a specific Netpbm program when anytopnm fails to convert it.\n\nIf  file indicates that the input file is compressed (either via Unix compress, gzip, or bzip\ncompression), anytopnm uncompresses it and proceeds as above with the uncompressed result.\n\nIf file indicates that the input file is encoded by uuencode or btoa, anytopnm decodes it and\nproceeds as above with the decoded result.\n\nIf file is - or not given, anytopnm takes its input from Standard Input.\n\nMany image formats are capable of representing multiple images.  In most cases, anytopnm con‐\nverts these to multi-image Netpbm images, but for some formats, anytopnm  converts  only  the\nfirst image and ignores the rest.\n\nIn the case of a multi-image GIF input, anytopnm converts all the images starting with Netpbm\n10.69 (December 2014), but only the first in earlier releases.\n\n\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "There are no command line options defined specifically for anytopnm.\n\nanytopnm  does not recognize the options common to all programs based on libnetpbm (See \u001b]8;;index.html#commonoptions\u001b\\ Com‐\nmon Options\u001b]8;;\u001b\\ .)  However, the -version option works.\n\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "pamfile(1), pnm(1), file man page\n\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "Copyright (C) 1991 by Jef Poskanzer.\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/anytopnm.html\n\nnetpbm documentation                      15 November 2014                   Anytopnm User Manual(1)",
            "subsections": []
        }
    },
    "summary": "anytopnm - convert an arbitrary type of image file to PBM, PGM, or PPM",
    "flags": [],
    "examples": [],
    "see_also": [
        {
            "name": "pamfile",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/pamfile/1/json"
        },
        {
            "name": "pnm",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/pnm/1/json"
        }
    ],
    "tldr": {
        "source": "official",
        "description": "Convert an arbitrary type of image file to common image formats.",
        "examples": [
            {
                "description": "Convert an input image to PBM, PGM, or PPM format irrespective of the input type",
                "command": "anytopnm {{path/to/input}} > {{path/to/output.pnm}}"
            },
            {
                "description": "Display version",
                "command": "anytopnm {{-v|-version}}"
            }
        ]
    }
}