ú΁[zā]      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\ SafeMTDThe Compression mode says how the image data is encoded in the file. ]]SafeMT 1Things that can go wrong when loading a BMP file. UMagic number was not at the start of the file, so this probably isn't a BMP file. +File is too short to contain a file header. -File is too short to contain an image header. ,File is too short to contain the image data. Reserved fields should be zero.UThe offset to the image data from the file header doesn't point anywhere sensible.hWe handle V3 V4 and V5 image headers, but the size of the header indicates it has some other format.#We only handle single color planes.$We only handle 24 and 32 bit images.#We only handle uncompressed images.lMismatch between the image size stated in the header and that which is calculuated from the other fields.$Something went wrong in the library.   SafeMTOContains the XYZ coordinates of a specific color in a specified color space. ^  ^NoneMT!6Device Independent Bitmap (DIB) header for Windows V3.#((+0) Size of the image header, in bytes.$#(+4) Width of the image, in pixels.%$(+8) Height of the image, in pixels.&jIf the height field in the file is negative then this is interpreted as an image with the rows flipped.'(+12) Number of color planes.((+14) Number of bits per pixel.)(+16) Image compression mode.*~(+20) Size of raw image data. Some encoders set this to zero, so we need to calculate it based on the overall file size.JIf it is non-zero then we check it matches the file size - header size.+@(+24) Prefered resolution in pixels per meter, along the X axis.,@(+28) Prefered resolution in pixels per meter, along the Y axis.-,(+32) Number of color entries that are used..#(+36) Number of significant colors._Size of ! header (in bytes)`<Check headers for problems and unsupported features. a3Compute the size of the image data from the header.We can't just use the *3 field because some encoders set this to zero.|We also can't use the physical size of the data in the file because some encoders add zero padding bytes on the end. !"#$%&'()*+,-._`ab!"#$%&'()*+,-._`a! "#$%&'()*+,-._`abNoneMT /DDevice Independent Bitmap (DIB) header for Windows V4 (95 and newer)1#Size of the image header, in bytes.2_Color masks specify components of each pixel. Only used with the bitfields compression mode.6"The color space used by the image.7ËSpecifies the XYZ coords of the three colors that correspond to the RGB endpoints for the logical color space associated with the bitmap. Only used when ColorSpaceType specifies a calibrated image.8mToned response curves for each component. Only used when the ColorSpaceType specifies a calibrated image.cSize of / header (in bytes)dīCheck headers for problems and unsupported features. With a V4 header we support both the uncompressed 24bit RGB format, and the uncompressed 32bit RGBA format.e3Compute the size of the image data from the header.We can't just use the *3 field because some encoders set this to zero.|We also can't use the physical size of the data in the file because some encoders add zero padding bytes on the end. /0123456789:cdef /0123456789:cde/ 0123456789:cdefNoneMT;IDevice Independent Bitmap (DIB) header for Windows V5 (98/2000 and newer)> Rendering intent for the bitmap.?WOffset (in bytes) from the beginning of the header to the start of the profile data.@)Size (in bytes) of embedded profile data.AReserved, should be zero.gSize of ; header (in bytes)h†Check headers for problems and unsupported features. The V5 header doesn't give us any more useful info than the V4 one.i3Compute the size of the image data from the header. ;<=>?@Aghij ;<=>?@Aghi;<=>?@AghijNoneMT BBMP file header.D(+0) Magic numbers 0x42 0x4dE (+2) Size of the file, in bytes.F(+6) Reserved, must be zero.G(+8) Reserved, must be zero.H5(+10) Offset in bytes to the start of the pixel data.k!Size of a file header (in bytes).l9Magic number that should come at the start of a BMP file.m:Check a file header for problems and unsupported features. BCDEFGHklmn BCDEFGHklmBCDEFGHklmn NoneMTI-A wrapper for the various image header types.oGet the common ! structure from a IIJKLopIJKLoIJKLop NoneMTMÛA BMP image. For an uncompressed image, the image data contains triples of BGR component values. Each line may also have zero pad values on the end, to bring them up to a multiple of 4 bytes in length.MNOPQMNOPQMNOPQ NoneMTR?Pack a string of RGBA component values into a 32-bit BMP image. Alias for S.S?Pack a string of RGBA component values into a 32-bit BMP image.:If the given dimensions don't match the input string then q.0If the width or height fields are negative then q.TsPack a string of RGBA component values into a 24-bit BMP image, discarding the alpha channel of the source data.:If the given dimensions don't match the input string then q.0If the width or height fields are negative then q.r*Wrap pre-packed image data into BMP image.s6Pack RGBA data into the format need by BMP image data.t<Pack RGBA data into the byte order needed by BMP image data.R#Width of image (must be positive).#Height of image (must be positive).8A string of RGBA component values. Must have length (width * height * 4)S#Width of image (must be positive).#Height of image (must be positive).8A string of RGBA component values. Must have length (width * height * 4)T#Width of image (must be positive).#Height of image (must be positive).8A string of RGBA component values. Must have length (width * height * 4)rNumber of bits per pixel#Width of image (must be positive).#Height of image (must be positive).8A string of RGBA component values. Must have length (width * height * 4)sWidth of image.Height of image.*Source bytestring holding the image data. utWidth of image.Height of image.*Source bytestring holding the image data. vRSTRSTrsutv NoneMTU8Unpack a BMP image to a string of RGBA component values.wWUnpack raw, uncompressed 24 bit BMP image data to a string of RGBA component values.2The alpha component is set to 255 for every pixel.x­Unpack raw, uncompressed 32 bit BMP image data to a string of RGBA component values. Note in the BMP file the components are arse-around ABGR instead of RGBA. The  unpacking4 here is really just flipping the components around.UwWidth of image.Height of image.'Image data is flipped along the X axis. Input string.yxWidth of image.Height of image.'Image data is flipped along the X axis. Input string.zUUwyxzNoneMTV’Read a BMP from a file. The file is checked for problems and unsupported features when read. If there is anything wrong this gives an  instead.W#Get a BMP image from a file handle.XParse a BMP image from a lazy {Y Wrapper for ZZ!Put a BMP image to a file handle.[Render a BMP image to a lazy {.\qGet the width and height of an image. It's better to use this function than to access the headers directly. VWX|}~YZ[\]  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]MNOPQBCDEFGHIJKL!"#$%&'()*+,-./0123456789:;<=>?@A  VWXYZ[RSTU\ VWX|}~YZ[\  !"#$%&'()*+,,--./0123456789::;<=>?@ABCDEEFGHIJKKLMNOP Q R S T U U V W X Y Z [ \]^_`abcdefghijklmnopqrstu v wxyz { | } ~  €  ‚ ƒ„…†‡ˆ‰Š"bmp-1.2.6.2-GnhjQh2VrTmF0J3PwB16b7 Codec.BMPCodec.BMP.CompressionCodec.BMP.ErrorCodec.BMP.CIEXYZCodec.BMP.BitmapInfoV3Codec.BMP.BitmapInfoV4Codec.BMP.BitmapInfoV5Codec.BMP.FileHeaderCodec.BMP.BitmapInfoCodec.BMP.BaseCodec.BMP.PackCodec.BMP.Unpack CompressionCompressionRGBCompressionRLE8CompressionRLE4CompressionBitFieldsCompressionJPEGCompressionPNGCompressionUnknownError ErrorBadMagicErrorFileHeaderTruncatedErrorImageHeaderTruncatedErrorImageDataTruncatedErrorReservedFieldNotZeroErrorDodgyFileHeaderFieldOffsetErrorUnhandledBitmapHeaderSizeErrorUnhandledPlanesCountErrorUnhandledColorDepthErrorUnhandledCompressionModeErrorImagePhysicalSizeMismatchErrorInternalErrorPleaseReport errorMagicerrorBytesNeedederrorBytesAvailableerrorFileHeaderOffseterrorBitmapHeaderSizeerrorPlanesCounterrorColorDeptherrorCompressionerrorImageSizeFromHeadererrorImageSizeOfBufferCIEXYZ BitmapInfoV3dib3Size dib3Width dib3Heightdib3HeightFlipped dib3Planes dib3BitCountdib3Compression dib3ImageSizedib3PelsPerMeterXdib3PelsPerMeterYdib3ColorsUseddib3ColorsImportant BitmapInfoV4 dib4InfoV3 dib4RedMask dib4GreenMask dib4BlueMask dib4AlphaMaskdib4ColorSpaceType dib4Endpoints dib4GammaReddib4GammaGreen dib4GammaBlue BitmapInfoV5 dib5InfoV4 dib5Intentdib5ProfileDatadib5ProfileSize dib5Reserved FileHeaderfileHeaderTypefileHeaderFileSizefileHeaderReserved1fileHeaderReserved2fileHeaderOffset BitmapInfoInfoV3InfoV4InfoV5BMP bmpFileHeader bmpBitmapInfobmpRawImageDatapackRGBA32ToBMPpackRGBA32ToBMP32packRGBA32ToBMP24unpackBMPToRGBA32readBMPhGetBMPparseBMPwriteBMPhPutBMP renderBMP bmpDimensions$fBinaryCompression$fBinaryCIEXYZsizeOfBitmapInfoV3checkBitmapInfoV3imageSizeFromBitmapInfoV3$fBinaryBitmapInfoV3sizeOfBitmapInfoV4checkBitmapInfoV4imageSizeFromBitmapInfoV4$fBinaryBitmapInfoV4sizeOfBitmapInfoV5checkBitmapInfoV5imageSizeFromBitmapInfoV5$fBinaryBitmapInfoV5sizeOfFileHeaderbmpMagiccheckFileHeader$fBinaryFileHeadergetBitmapInfoV3$fBinaryBitmapInfobaseGHC.Errerror packDataToBMPpackRGBA32ToBGR24packRGBA32ToBGRA32packRGBA32ToBGR24'packRGBA32ToBGRA32'packRGB24ToRGBA32packRGB32ToRGBA32packRGB24ToRGBA32'packRGB32ToRGBA32'bytestring-0.10.8.1Data.ByteString.Internal ByteString parseBMP2 parseBMP3 parseBMP4