8A      !"#$%&'()*+,-./0123456789:;<=>?@ A$Macroblock that can be transformed. BCDEFGHIJKLMNOPQRSTUVWXY1Create a new macroblock with the good array size Z[\6Algorithm to call to perform an IDCT, return the same $ block that the one given as input. ]1Perform a Jpeg level shift in a mutable fashion. AY\]AY\] ^CEnumeration used to search in the tables for different components. _`a4Represent a compact array of 8 * 8 values. The size < is not guarenteed by type system, but if makeMacroBlock is + used, everything should be fine size-wise b1Tree storing the code used for huffman encoding. cno value present dWe should output the value e5If bit is 0 take the first subtree, if 1, the right. f=Helper function to create pure macro block of the good size. g8Transform parsed coefficients from the jpeg header to a ( tree which can be used to decode data. ^_`abcdefg ^`__`abedccdefg30This class abstract colorspace conversion. This 8 conversion can be lossy, which ColorConvertible cannot $Implement upcasting for pixel types ! Minimal declaration declaration  = It is strongly recommanded to overload promoteImage to keep  performance acceptable 1Convert a pixel type to another pixel type. This ' operation should never loss any data. GChange the underlying pixel type of an image by performing a full copy  of it. 'Typeclass used to query a type about it' s properties ( regarding casting to other pixel types 3Tell if a pixel can be converted to another pixel, ) the first value should not be used, and h can  be used as a valid value. ,Return the number of component of the pixel 2Calculate the index for the begining of the pixel ACalculate theindex for the begining of the pixel at position x y 5Return the constructor associated to the type, again H the value in the first parameter is not used, so you can use undefined 8Extract a pixel at a given position, (x, y), the origin < is assumed to be at the corner top left, positive y to the  bottom of the image (Same as pixelAt but for mutable images. 1Write a pixel in a mutable image at position x y Describe pixel kind at runtime For 2 bits pixels =Pixel type storing a classic pixel, with an alpha component. * Values are stored in the following order  Red  Green  Blue  Alpha ,Pixel storing data in the YCbCr colorspace, + value are stored in teh following order :  Y (luminance)  Cr  Cb +Pixel type storing classic pixel on 8 bits + Value are stored in the following order :  Red  Green  Blue 7Pixel type storing Luminance (Y) and alpha information  on 8 bits. + Value are stored in the following order :  Luminance  Alpha ,Simple alias for greyscale value in 8 bits. ;Type allowing the loading of an image with different pixel  structures 0An image in the colorspace used by Jpeg images. !-An image in true color and an alpha channel. "An image in true color. #-An image in greyscale with an alpha channel. $A greyscale image. %<Image or pixel buffer, the coordinates are assumed to start > from the upper-left corner of the image, with the horizontal O position first, then the vertical one. The image can be transformed in place. &'Width of the image in pixels (Height of the image in pixels. )3The real image, to extract pixels at some position ' you should use the helpers functions. *<Image or pixel buffer, the coordinates are assumed to start > from the upper-left corner of the image, with the horizontal ( position first, then the vertical one. +,Width of the image in pixels -Height of the image in pixels. .3The real image, to extract pixels at some position ' you should use the helpers functions. /@Tell if you can convert between two pixel types, both arguments  are unused. ijk'Free promotion for identic pixel types 0  !"#$%&'()*+,-./0*+,-.%&'()$#"!  /0  $#"! !"#$%&'()&'()*+,-.+,-./8l0Different known interlace methods for PNG image mUse the Adam7 ordering, see adam7Reordering n2No interlacing, basic data ordering, line by line  from left to right. oThe pixels value should be :  +---+---+  | c | b |  +---+---+  | a | x |  +---+---+ $ x being the current filtered pixel p?Filt(x) = Orig(x) - PaethPredictor(Orig(a), Orig(b), Orig(c)), C Recon(x) = Filt(x) + PaethPredictor(Recon(a), Recon(b), Recon(c)) q.Filt(x) = Orig(x) - floor((Orig(a) + Orig(b)) / 2), 2 Recon(x) = Filt(x) + floor((Recon(a) + Recon(b)) / 2) r<Filt(x) = Orig(x) - Orig(b), Recon(x) = Filt(x) + Recon(b) s<Filt(x) = Orig(x) - Orig(a), Recon(x) = Filt(x) + Recon(a) t&Filt(x) = Orig(x), Recon(x) = Filt(x) u$Low level access to PNG information vwThe real uncompressed image x9List of raw chunk where some user data might be present. yHPNG chunk representing some extra information found in the parsed file. z{The raw data inside the chunk |The name of the chunk. }&Data structure during real png loading/parsing ~5Palette with indices beginning at 0 to elemcount - 1 +Raw parsed image which need to be decoded. 8What kind of information is encoded in the IDAT section  of the PngFile #Generic header used in PNG images. Image width in number of pixel  Image height in number of pixel Number of bit per sample 6Kind of png image (greyscale, true color, indexed...) Compression method used  Must be 0 7If the image is interlaced (for progressive rendering) :Value used to identify a png chunk, must be 4 bytes long. "Parse a palette from a png chunk. 5Parse method for a png chunk, without decompression. 6Implementation of the get method for the PngRawImage, , unpack raw data, without decompressing it. ASignature signalling that the following data will be a png image  in the png bit stream )Helper function to help pack signatures. :Signature for the header chunk of png (must be the first) 4Signature for a palette chunk in the pgn file. Must  occure before iDAT. 4Signature for a data chuck (with image parts in it) 5Signature for the last chunk of a png image, telling  the end. +From the Annex D of the png specification. DCompute the CRC of a raw buffer, as described in annex D of the PNG  specification. 1lmnopqrstuvwxyz{|}~1lnmmnotsrqppqrstuvwxvwxyz{|z{|}~~ 0(Encode an image into a png if possible. 18Transform an image into a png encoded bytestring, ready  to be writte as a file. 2=Helper function to directly write an image as a png on disk. 38Write a dynamic image in a .png image file if possible. 1 The same restriction as encodeDynamicPng apply. 4FEncode a dynamic image in bmp if possible, supported pixel type are :  RGB8  RGBA8  Y8 01234011234'ESimple structure used to hold information about Adam7 deinterlacing. A A structure is used to avoid pollution of the module namespace.  The real info about the matrix. >Apply a filtering method on a reduced image. Apply the filter E on each line, using the previous line (the one above it) to perform  some prediction on the value.  Image size CDirectly stolen from the definition in the standard (on W3C page),  pixel predictor. "Unpack lines where bit depth is 8 "Unpack lines where bit depth is 1 !Unpack lines when bit depth is 2 @Transform a scanline to a bunch of bytes. Bytes are then packed  into pixels at a further step. ?Given data and image size, recreate an image with deinterlaced  data for PNG's adam 7 method. 8deinterlace picture in function of the method indicated  in the iHDR 5?Helper function trying to load a png file from a file on disk. 6=Transform a raw png image to an image, without modifying the 6 underlying pixel type. If the image is greyscale and < 8 bits, < a transformation to RGBA8 is performed. This should change  in the future. 5 The resulting image let you manage the pixel types. 5This function can output the following pixel types :  PixelY8  PixelYA8  PixelRGB8  PixelRGBA8 0123456015624356|0Type of a data unit (as in the ITU 81) standard <Same as for DcCoefficient, to provide nicer type signatures BType only used to make clear what kind of integer we are carrying 1 Might be transformed into newtype in the future )Current bit index, current value, string !0 : DC, 1 : AC, stored on 4 bits Stored on 4 bits 9Type introduced only to avoid some typeclass overlapping  problem Stored on 4 bits Stored on 4 bits  (begin, end) Encoded as 4 bits Encoded as 4 bits Encoded as 4 bits Encoded as 4 bits Stored with 4 bits Stored with 4 bits       !"#$ADecode a list of huffman values, not optimized for speed, but it  should work. %ADrop all bit until the bit of indice 0, usefull to parse restart : marker, as they are byte aligned, but Huffman might not. &#Bitify a list of things to decode. '()*+,-./0123,Apply a quantization matrix to a macroblock 4567<This is one of the most important function of the decoding, : it form the barebone decoding pipeline for macroblock. It's all 1 there is to know for macro block transformation 899Unpack an int of the given size encoded from MSB to LSB. :;<2Assume the macro block is initialized with zeroes =IDecompress a macroblock from a bitstream given the current configuration  from the frame. Tree used for DC coefficient Tree used for Ac coefficient Current quantization table Previous dc value >?@AB=Given a size coefficient (how much a pixel span horizontally @ and vertically), the position of the macroblock, return a list ? of indices and value to be stored in an array (like the final  image) Component count Component index Width coefficient Height coefficient x y CDComponent count "Function to call to decode an MCU Result image to write into EFBAn MCU (Minimal coded unit) is an unit of data for all components  (Y, Cb &( Cr), taking into account downsampling. 7@Try to load a jpeg file and decompress. The colorspace is still D YCbCr if you want to perform computation on the luma part. You can  convert it to RGB using colorSpaceConversion 8FTry to decompress a jpeg file and decompress. The colorspace is still D YCbCr if you want to perform computation on the luma part. You can  convert it to RGB using colorSpaceConversion 5This function can output the following pixel types :  PixelY8  PixelYCbCr8 787878)9?All the instance of this class can be written as a bitmap file  using this library. GHIJKLMNOPQRSTUPixels per meter VPixels per meter WXYZ[\ in bytes ]^_`abcdefg:Try to decode a bitmap image. @ Right now this function can output the following pixel types :  PixelRGB8 ;0Write an image in a file use the bitmap format. h<EEncode an image into a bytestring in .bmp format ready to be written  on disk. =8Write a dynamic image in a .bmp image file if possible. 4 The same restriction as encodeDynamicBitmap apply. >FEncode a dynamic image in bmp if possible, supported pixel type are :  RGB8  RGBA8  Y8 i9Convert an image to a bytestring ready to be serialized. 9:;<=>;<:>=99:;<=>j1Return the first Right thing, accumulating error ?FLoad an image file without even thinking about it, it does everything  as @ @EIf you want to decode an image in a bytestring without even thinking I in term of format or whatever, this is the function to use. It will try H to decode in each known format and if one decoding succeed will return  the decoded image in it's own colorspace *  !"#$*0123456789:;<=>?@*?@9;<:>=780156243*$#"!  ?@k      !!""##$%&'()*++,-.//0123 4 5 6 7 89:;<=>?@ABCDEFFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmZ[nopqrstuvwxxyz{{|}~~ YZ[     YZ[ !"#$%&'()*+,-./0D12345667789:;<=>?@AABCDEFGHIJYK[LMNOPJuicyPixels-1.0Codec.Picture.TypesCodec.Picture.PngCodec.Picture.JpgCodec.Picture.Bitmap Codec.PictureCodec.Picture.Jpg.FastIdctCodec.Picture.Jpg.DefaultTableCodec.Picture.Png.TypeCodec.Picture.Png.ExportColorSpaceConvertible convertPixel convertImageColorConvertible promotePixel promoteImagePixel canPromoteTocomponentCountpixelBaseIndexmutablePixelBaseIndex promotionTypepixelAt readPixel writePixel PixelTypePixelYChromaRChromaB8PixelRedGreenBlueAlpha8PixelRedGreenBlue8PixelGreyscaleAlphaPixelGreyscalePixelMonochromatic PixelRGBA8 PixelYCbCr8 PixelRGB8PixelYA8Pixel8 DynamicImage ImageYCbCr8 ImageRGBA8 ImageRGB8ImageYA8ImageY8 MutableImagemutableImageWidthmutableImageHeightmutableImageDataImage imageWidth imageHeight imageData canConvertTo PngSavable encodePngwritePngwriteDynamicPngencodeDynamicPngreadPng decodePngreadJpeg decodeJpeg BmpEncodable decodeBitmap writeBitmap encodeBitmapwriteDynamicBitmapencodeDynamicBitmap readImage decodeImageMutableMacroBlock IDctStagex0x1x2x3x4x5x6x7x8iclip.<<..>>.w1w2w3w5w6w7!!!.!!!..<-.createEmptyMutableMacroBlockidctRowidctColfastIdctmutableLevelShift DctComponent AcComponent DcComponent MacroBlock HuffmanTreeEmptyLeafBranchmakeMacroBlockbuildHuffmanTreebaseGHC.Err undefined$fColorConvertibleaaPngInterlaceMethodPngInterlaceAdam7PngNoInterlace PngFilter FilterPaeth FilterAverageFilterUp FilterSub FilterNone PngLowLevelpngImage pngChunksPngChunk pngChunkDatapngChunkSignature PngRawChunk chunkLength chunkTypechunkCRC chunkData PngPalette PngRawImageheaderchunks PngImageTypePngTrueColourWithAlphaPngGreyscaleWithAlphaPngIndexedColor PngTrueColour PngGreyscalePngIHdrwidthheightbitDepth colourTypecompressionMethod filterMethodinterlaceMethodChunkSignature parsePalette parseChunksparseRawPngImage pngSignature signature iHDRSignature pLTESignature iDATSignature iENDSignatureimageTypeOfCode pngCrcTable pngComputeCrcpreparePngHeaderendChunkprepareIDatChunkgenericEncodePng BeginOffset StrideInfo LineUnpackerPngLine ByteReaderAdam7MatrixInfoadam7StartingRowadam7StartingColadam7RowIncrementadam7ColIncrementadam7BlockHeightadam7BlockWidthadam7MatrixInfounparsePngFilter getNextByte pngFilteringpaeth byteUnpacker bitUnpackertwoBitsUnpackerhalfByteUnpacker shortUnpackerscanlineUnpackerbyteSizeOfBitLengthscanLineInterleaving adam7Unpack deinterlacergenerateGreyscalePalettesampleCountOfImageType paletteRGBA1 paletteRGBA2 paletteRGBA4 applyPalette JpegDecoderrestartIntervalhorizontalMcuCountverticalMcuCount mcuDecoderDataUnitDecoderDctCoefficients DcCoefficient BoolReader BoolStateRestartIntervalJpgHuffmanTableSpechuffmanTableClasshuffmanTableDest huffSizes huffCodesSizeCalculable calculateSize TableListJpgQuantTableSpecquantPrecisionquantDestination quantTable JpgScanHeader scanLengthscanComponentCountscansspectralSelectionsuccessiveApproxHighsuccessiveApproxLowJpgScanSpecificationcomponentSelectordcEntropyCodingTableacEntropyCodingTableJpgImagejpgFrame JpgComponentcomponentIdentifierhorizontalSamplingFactorverticalSamplingFactorquantizationTableDestJpgFrameHeaderjpgFrameHeaderLengthjpgSamplePrecision jpgHeightjpgWidthjpgImageComponentCount jpgComponentsJpgFrameJpgIntervalRestartJpgScans JpgScanBlobJpgHuffmanTable JpgQuantTable JpgExtension JpgAppFrame JpgFrameKindJpgRestartIntervalJpgExtensionSegment JpgAppSegmentJpgStartOfScanJpgHuffmanTableMarkerJpgQuantizationTable!JpgDifferentialLosslessArithmetic'JpgDifferentialProgressiveDCTArithmetic&JpgDifferentialSequentialDCTArithmeticJpgLosslessArithmeticJpgProgressiveDCTArithmeticJpgExtendedSequentialArithmeticJpgDifferentialLosslessHuffman$JpgDifferentialProgressiveDCTHuffman#JpgDifferentialSequentialDCTHuffmanJpgLosslessHuffmanJpgProgressiveDCTHuffmanJpgExtendedSequentialDCTHuffmanJpgBaselineDCTHuffmanbuildPackedHuffmanTree huffmanDecode byteAlignsetDecodedString getNextBitcommonMarkerFirstByte checkMarker eatUntilCodetakeCurrentFrame parseFramessecondStartOfFrameByteOfKindput4BitsOfEach get4BitOfEach deQuantizeinverseDirectCosineTransform zigZagOrder zigZagReorderdecodeMacroBlockpackInt unpackInt decodeIntdcCoefficientDecodeacCoefficientsDecodedecompressMacroBlockgatherQuantTablesgatherHuffmanTablesgatherScanInfo pixelClampunpackMacroBlockdecodeRestartIntervalallElementsEqualbuildJpegImageDecoder bitsPerPixel bmpEncodedefaultPalette BmpPalette BmpInfoHeadersizeplanes bitPerPixelbitmapCompression byteImageSize xResolution yResolution colorCountimportantColours BmpHeadermagicIdentifierfileSize reserved1 reserved2 dataOffsetbitmapMagicIdentifiersizeofBmpHeader sizeofBmpInfo putPalette stridePutdecodeImageRGB8 linePaddingencodeBitmapWithPalette eitherLoad