M      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKL  Safe-Infered MCEnumeration used to search in the tables for different components. N4Represent 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 O1Tree storing the code used for huffman encoding. Pno value present QWe should output the value R5If bit is 0 take the first subtree, if 1, the right. S=Helper function to create pure macro block of the good size. T8Transform parsed coefficients from the jpeg header to a ( tree which can be used to decode data. U$From the Table K.3 of ITU-81 (p153) V$From the Table K.4 of ITU-81 (p153) W$From the Table K.5 of ITU-81 (p154) XMYZ[N\OPQR]ST^_`aUbVcWdeXMYZ[N\OPQR]ST^_`aUbVcWdeXMZY[N\ORQP]ST^_`aUbVcWde Safe-Inferedf$Macroblock that can be transformed. g1Create a new macroblock with the good array size hReturn the transformed block fijkghThe updating function lfijkghlfijkghl Safe-Inferedm6Algorithm to call to perform an IDCT, return the same $ block that the one given as input. n1Perform a Jpeg level shift in a mutable fashion. mnfgmnmn  Safe-InferedoGReference implementation of the DCT, directly implementing the formula  of ITU-81. It'<s slow as hell, perform to many operations, but is accurate  and a good reference point. p Fast DCT extracted from libjpeg opopop  Safe-InferedqType used to read bits rADrop all bit until the bit of indice 0, usefull to parse restart : marker, as they are byte aligned, but Huffman might not. s)Return the next bit in the input stream. t#Bitify a list of things to decode. u,Run the writer and get the serialized data. v&Append some data bits to a Put monad. wqrstuv=The real data to be stored. Actual data should be in the LSB $Number of bit to write from 1 to 32 xywqrstuv wqrstuvxy Safe-Infered/.Helper class to help extract a luma plane out  of an image or a pixel &Compute the luminance part of a pixel +Extract a luma plane out of an image. This / method is in the typeclass to help performant  implementation. 0This class abstract colorspace conversion. This 8 conversion can be lossy, which ColorConvertible cannot ;Pass a pixel from a colorspace (say RGB) to the second one  (say YCbCr) 5Helper function to convert a whole image by taking a  copy it. $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 z 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 the 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. -:Class modeling transparent pixel, should provide a method  to combine transparent pixels .#Just return the opaque pixel value /<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. 1Width of the image in pixels 2Height of the image in pixels. 33The real image, to extract pixels at some position ' you should use the helpers functions. 4=Extract an image plane of an image, returning an image which + can be represented by a gray scale image. 56For any image with an alpha component (transparency), ) drop it, returning a pure opaque image. 6@Tell if you can convert between two pixel types, both arguments  are unused. 75Create an image given a function to generate pixels. G The function will receive value from 0 to width-1 for the x parameter H and 0 to height-1 for the y parameter. The coordinate 0,0 is the upper K left corner of the image, and (width-1, height-1) the lower right corner. 8{6 equivalent for an image, working at the pixel level. |'Free promotion for identic pixel types Z  !"#$%&'()*+,-./01234CThe component index, beginning at 0 ending at (componentCount - 1)  Source image 567Generating function, with x and y params. Width in pixels Height in pixels 8}~|9  !"#$%&'()*+,-./0123456789/0123()*+,"'&%$#!  -.648574   !"'&%$#()*+,-./012345678}~|  Safe-Infered!0Different known interlace methods for PNG image Use the Adam7 ordering, see adam7Reordering 2No interlacing, basic data ordering, line by line  from left to right. The pixels value should be :  +---+---+  | c | b |  +---+---+  | a | x |  +---+---+ $ x being the current filtered pixel ?Filt(x) = Orig(x) - PaethPredictor(Orig(a), Orig(b), Orig(c)), C Recon(x) = Filt(x) + PaethPredictor(Recon(a), Recon(b), Recon(c)) .Filt(x) = Orig(x) - floor((Orig(a) + Orig(b)) / 2), 2 Recon(x) = Filt(x) + floor((Recon(a) + Recon(b)) / 2) <Filt(x) = Orig(x) - Orig(b), Recon(x) = Filt(x) + Recon(b) <Filt(x) = Orig(x) - Orig(a), Recon(x) = Filt(x) + Recon(a) &Filt(x) = Orig(x), Recon(x) = Filt(x) $Low level access to PNG information The real uncompressed image 9List of raw chunk where some user data might be present. HPNG chunk representing some extra information found in the parsed file. 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. 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. DCompute the CRC of a raw buffer, as described in annex D of the PNG  specification. 71  Safe-Infered9(Encode an image into a png if possible. :8Transform an image into a png encoded bytestring, ready  to be writte as a file. ;=Helper function to directly write an image as a png on disk. <8Write a dynamic image in a .png image file if possible. 1 The same restriction as encodeDynamicPng apply. =FEncode a dynamic image in bmp if possible, supported pixel type are :  RGB8  RGBA8  Y8 9:;<=9:;<=9:;<= Safe-Infered>=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 >9:;<=>9:>;=<> Safe-Infered?FTry 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 @8Encode an image in jpeg at a reasonnable quality level. = If you want better quality or reduced file size, you should  use A A-Function to call to encode an image to jpeg. ; The quality factor should be between 0 and 100 (100 being  the best quality). ?@AQuality factor Image to encode  Encoded JPEG ?@A?A@?@A Safe-InferedB?All the instance of this class can be written as a bitmap file  using this library. CTry to decode a bitmap image. @ Right now this function can output the following pixel types :  PixelRGB8 D0Write an image in a file use the bitmap format. EEEncode an image into a bytestring in .bmp format ready to be written  on disk. F8Write a dynamic image in a .bmp image file if possible. 4 The same restriction as encodeDynamicBitmap apply. GFEncode a dynamic image in bmp if possible, supported pixel type are :  RGB8  RGBA8  Y8 BCDEFGBCDEFGDECGFB BCDEFG Safe-InferedHFLoad an image file without even thinking about it, it does everything  as I IEIf 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 J?Helper function trying to load a png file from a file on disk. K@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 L=Try to load a .bmp file. The colorspace would be RGB or RGBA HIJKL3  !"#$%&'/0123789:;<=>?@ABCDEFGHIJKL3HI87BDELCGFK?@A9:J>;=</0123"'&%$# ! HIJKL  !"#$%&&''(())*+,-./011234567789:;<=>? @ A B C DEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstu v w x y z { | } ~                              JuicyPixels-1.2Codec.Picture.TypesCodec.Picture.PngCodec.Picture.JpgCodec.Picture.Bitmap Codec.PictureCodec.Picture.Jpg.DefaultTableCodec.Picture.Jpg.TypesCodec.Picture.Jpg.FastIdctCodec.Picture.Jpg.FastDctCodec.Picture.BitWriterCodec.Picture.Png.TypeCodec.Picture.Png.ExportLumaPlaneExtractable computeLumaextractLumaPlaneColorSpaceConvertible convertPixel convertImageColorConvertible promotePixel promoteImagePixel canPromoteTocomponentCountpixelBaseIndexmutablePixelBaseIndex promotionTypepixelAt readPixel writePixel PixelTypePixelYChromaRChromaB8PixelRedGreenBlueAlpha8PixelRedGreenBlue8PixelGreyscaleAlphaPixelGreyscalePixelMonochromatic PixelRGBA8 PixelYCbCr8 PixelRGB8PixelYA8Pixel8 DynamicImage ImageYCbCr8 ImageRGBA8 ImageRGB8ImageYA8ImageY8 MutableImagemutableImageWidthmutableImageHeightmutableImageDataTransparentPixeldropTransparencyImage imageWidth imageHeight imageDataextractComponentdropAlphaLayer canConvertTo generateImagepixelMap PngSavable encodePngwritePngwriteDynamicPngencodeDynamicPng decodePng decodeJpeg encodeJpegencodeJpegAtQuality BmpEncodable decodeBitmap writeBitmap encodeBitmapwriteDynamicBitmapencodeDynamicBitmap readImage decodeImagereadPngreadJpeg readBitmap DctComponent MacroBlock HuffmanTreeEmptyLeafBranchmakeMacroBlockbuildHuffmanTreedefaultDcLumaHuffmanTabledefaultDcChromaHuffmanTabledefaultAcLumaHuffmanTable HuffmanTable AcComponent DcComponentQuantificationTableHuffmanWriterCodemakeInverseTablescaleQuantisationMatrixdefaultLumaQuantizationTabledefaultChromaQuantizationTabledefaultDcLumaHuffmanTreedefaultDcChromaHuffmanTreedefaultAcLumaHuffmanTreedefaultAcChromaHuffmanTreedefaultAcChromaHuffmanTableMutableMacroBlockcreateEmptyMutableMacroBlockmutate!!!.!!!..<-.printMacroBlockfastIdctmutableLevelShift referenceDctfastDctLibJpeg BoolReader byteAlign getNextBitsetDecodedString runBoolWriter writeBits BoolWriter$fMonadBoolWriterT$fMonadTransBoolWriterTbaseGHC.Err undefinedGHC.Basemap$fColorConvertibleaa+$fColorSpaceConvertiblePixelYCbCr8PixelRGB8+$fColorSpaceConvertiblePixelRGB8PixelYCbCr8$fColorSpaceConvertibleaa$fPixelPixelYCbCr8$fPixelPixelRGBA8%$fColorConvertiblePixelRGB8PixelRGBA8$fPixelPixelRGB8$$fColorConvertiblePixelYA8PixelRGBA8#$fColorConvertiblePixelYA8PixelRGB8$fPixelPixelYA8!$fColorConvertibleWord8PixelRGBA8 $fColorConvertibleWord8PixelRGB8$fColorConvertibleWord8PixelYA8 $fPixelWord8!$fLumaPlaneExtractablePixelYCbCr8$fLumaPlaneExtractablePixelYA8 $fLumaPlaneExtractablePixelRGBA8$fLumaPlaneExtractablePixelRGB8$fLumaPlaneExtractableWord8$fStorablePixelRGBA8$fSerializePixelRGBA8$fStorablePixelYCbCr8$fSerializePixelYCbCr8$fStorablePixelRGB8$fSerializePixelRGB8$fStorablePixelYA8$fSerializePixelYA8$fNFDataDynamicImage$fNFDataMutableImage $fNFDataImage%$fTransparentPixelPixelRGBA8PixelRGB8$fTransparentPixelPixelYA8Word8PngInterlaceMethodPngInterlaceAdam7PngNoInterlace PngFilter FilterPaeth FilterAverageFilterUp FilterSub FilterNone PngLowLevelpngImage pngChunksPngChunk pngChunkDatapngChunkSignature PngRawChunk PngPalette PngRawImage PngImageTypePngIHdrwidthheightbitDepth colourTypecompressionMethod filterMethodinterlaceMethodChunkSignature parsePalette pLTESignature iDATSignature iENDSignature pngComputeCrc chunkLength chunkTypechunkCRC chunkDataheaderchunksPngTrueColourWithAlphaPngGreyscaleWithAlphaPngIndexedColor PngTrueColour PngGreyscale$fSerializePngImageType$fSerializePngInterlaceMethod$fSerializePngIHdr$fSerializePngRawChunk$fSerializePngRawImage$fSerializePngFilter$fPngSavableWord8$fPngSavablePixelRGB8$fPngSavablePixelRGBA8$fSerializeJpgScanHeader$fSerializeJpgScanSpecification$fSerializeJpgFrameHeader$fSerializeJpgComponent$fSerializeRestartInterval$fSerializeJpgFrameKind$fSerializeJpgImage$fSerializeJpgHuffmanTableSpec#$fSizeCalculableJpgHuffmanTableSpec$fSerializeJpgQuantTableSpec!$fSizeCalculableJpgQuantTableSpec$fSerializeTableList$fSizeCalculableJpgScanHeader$$fSizeCalculableJpgScanSpecification$fSizeCalculableJpgComponent$fSizeCalculableJpgFrameHeader$fBmpEncodablePixelRGB8$fBmpEncodablePixelRGBA8$fBmpEncodableWord8$fSerializeBmpInfoHeader$fSerializeBmpHeader