Image::Info::BMP(3)
πΈ NAME πΈ
okay so bestie, welcome to Image::Info::BMP(3) β the Image::Info::BMP page from User Contributed Perl Documentation, and it's literally Windows Device Independent Bitmap support for Image::Info β¨
π SYNOPSIS π
like, here's the whole vibe in code:
use Image::Info qw(image_info dim);
my $info = image_info("image.bmp");
if (my $error = $info->{error}) {
die "Can't parse image info: $error\n";
}
my $color = $info->{color_type};
my($w, $h) = dim($info);
π¦ DESCRIPTION π¦
This module supplies the standard key names except for Gamma, Interlace, and LastModificationTime, as well as these extra keys, bestie:
BMP_ColorsImportantβ specifies the number of color indexes that are required for displaying the bitmap. If this value is zero, all colors are required.BMP_Originβ if true the bitmap is a bottom-up DIB and its origin is the lower-left corner. Otherwise, the bitmap is a top-down DIB and its origin is the upper-left corner.ColorPaletteβ reference to an array of all colors used. This key is only present ifimage_infois invoked asimage_info($file, ColorPalette=>1).ColorTableSizeβ the number of colors the image uses. If0then this is a true color image. The number of colors available is2 ^ BitsPerSample.
π§ METHODS π§
πͺ process_file() πͺ
$info->process_file($source, $options);
Processes one file and sets the found info fields in the $info object.
π SEE ALSO π
Image::Info β that's the one, bestie.
π NOTES π
For more information about BMP see <http://msdn.microsoft.com>.
Random notes:
warn if height is negative and compress is not RGB or BITFILEDS (0 or 3)
ICO and CUR support?
### v5
If bit depth is 0, it relies upon underlying JPG/PNG :-(
Extra Information
DWORD bV5RedMask;
DWORD bV5GreenMask;
DWORD bV5BlueMask;
DWORD bV5AlphaMask;
DWORD bV5CSType;
CIEXYZTRIPLE bV5EndPoints; #3*CIEXYZ #CIEXYZ = 3*FXPT2DOT30#FXPT2DOT30 = long
DWORD bV5GammaRed;
DWORD bV5GammaGreen;
DWORD bV5GammaBlue;
DWORD bV5Intent;
DWORD bV5ProfileData;
DWORD bV5ProfileSize;
π©Ί DIAGNOSTICS π©Ί
Size mismatchβ the image may be correct, but the filesize does not match the internally stored value. π
π BUGS π
okay so huge caveat: the current implementation only functions on little-endian architectures. Consequently erroneous data concerning compression (includingfile_extandfile_mime_type) may be reported. π
π AUTHOR π
Jerrad Pierce <belg4mit@mit.edu>/<webmaster@pthbb.org>
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
This page is brought to you by perl v5.42.0, dated 2024-03-08 β Image::Info::BMP(3) signing off, periodt π
β¨
π¦ where this page comes from
- opensuse-leap 16.0: perl-Image-Info 1.440.0-bp160.1.11 Β· Artistic-1.0 OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms