{
    "mode": "perldoc",
    "parameter": "Image::Info::BMP",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/Image%3A%3AInfo%3A%3ABMP/json",
    "generated": "2026-06-09T21:23:01Z",
    "synopsis": "use Image::Info qw(imageinfo dim);\nmy $info = imageinfo(\"image.bmp\");\nif (my $error = $info->{error}) {\ndie \"Can't parse image info: $error\\n\";\n}\nmy $color = $info->{colortype};\nmy($w, $h) = dim($info);",
    "sections": {
        "NAME": {
            "content": "Image::Info::BMP - Windows Device Independent Bitmap support for Image::Info\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "use Image::Info qw(imageinfo dim);\n\nmy $info = imageinfo(\"image.bmp\");\nif (my $error = $info->{error}) {\ndie \"Can't parse image info: $error\\n\";\n}\nmy $color = $info->{colortype};\n\nmy($w, $h) = dim($info);\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "This module supplies the standard key names except for Gamma, Interlace, LastModificationTime,\nas well as:\n\nBMPColorsImportant\nSpecifies the number of color indexes that are required for displaying the bitmap. If this\nvalue is zero, all colors are required.\n\nBMPOrigin\nIf true the bitmap is a bottom-up DIB and its origin is the lower-left corner. Otherwise,\nthe bitmap is a top-down DIB and its origin is the upper-left corner.\n\nColorPalette\nReference to an array of all colors used. This key is only present if \"imageinfo\" is\ninvoked as \"imageinfo($file, ColorPalette=>1)\".\n\nColorTableSize\nThe number of colors the image uses. If 0 then this is a true color image. The number of\ncolors *available* is 2 ^ BitsPerSample.\n",
            "subsections": []
        },
        "METHODS": {
            "content": "processfile()\n$info->processfile($source, $options);\n\nProcesses one file and sets the found info fields in the $info object.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "Image::Info\n",
            "subsections": []
        },
        "NOTES": {
            "content": "For more information about BMP see <http://msdn.microsoft.com>.\n\nRandom notes:\n\nwarn if height is negative and compress is not RGB or BITFILEDS (0 or 3)\nICO and CUR support?\n### v5\nIf bit depth is 0, it relies upon underlying JPG/PNG :-(\nExtra Information\nDWORD        bV5RedMask;\nDWORD        bV5GreenMask;\nDWORD        bV5BlueMask;\nDWORD        bV5AlphaMask;\nDWORD        bV5CSType;\nCIEXYZTRIPLE bV5EndPoints; #3*CIEXYZ #CIEXYZ = 3*FXPT2DOT30#FXPT2DOT30 = long\nDWORD        bV5GammaRed;\nDWORD        bV5GammaGreen;\nDWORD        bV5GammaBlue;\nDWORD        bV5Intent;\nDWORD        bV5ProfileData;\nDWORD        bV5ProfileSize;\n",
            "subsections": []
        },
        "DIAGNOSTICS": {
            "content": "Size mismatch\nThe image may be correct, but the filesize does not match the internally stored value.\n",
            "subsections": []
        },
        "BUGS": {
            "content": "The current implementation only functions on little-endian architectures. Consequently erroneous\ndata concerning compression (including fileext and filemimetype) may be reported.\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "Jerrad Pierce <belg4mit@mit.edu>/<webmaster@pthbb.org>\n\nThis library is free software; you can redistribute it and/or modify it under the same terms as\nPerl itself.\n",
            "subsections": []
        }
    },
    "summary": "Image::Info::BMP - Windows Device Independent Bitmap support for Image::Info",
    "flags": [],
    "examples": [],
    "see_also": []
}