sDQ      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%& ' ( ) * + ,-./012345678 9 : ; < = > ? @ A B C D E F G H I J K L M N O P  (c) Alexey Kuleshevich 2016BSD3%Alexey Kuleshevich <lehins@yandex.ru> experimental non-portableNone3457>L *Image formats that can be written to file.Encode an image to Q. )Image formats that can be read from file.!Decode an image from Q."Image file format. Helps in guessing image format using a file extension, as well as supplying format specific options during saving an image.#@Options that can be used during writing an image in this format.$-Default file extension for this image format.%'Known extensions for this image format.&Returns R if a file extension (ex. ".png") corresponds to this format.S0Used during converting pixels between libraries.T,Global variable for setting display program.UEImplemented here for backwards compatibility with `process < 1.2.0.0`  !"#$%&SVTU  !"#$%&SVTU !"#$%&SVTU(c) Alexey Kuleshevich 2016BSD3%Alexey Kuleshevich <lehins@yandex.ru> experimental non-portableNone &3457>LNA'Approach to be used near the border during transformations, which, besides a pixel of interest, also use it's neighbors, consequently going out of bounds at the edges of an image.(Fill in a constant pixel. ( outside | Image | outside ((" 0) : 0 0 0 0 | 1 2 3 4 | 0 0 0 0 )2Wrap around from the opposite border of the image. ' outside | Image | outside )# : 1 2 3 4 | 1 2 3 4 | 1 2 3 4 * Replicate the pixel at the edge. ' outside | Image | outside *# : 1 1 1 1 | 1 2 3 4 | 4 4 4 4 +Mirror like reflection. ' outside | Image | outside + : 4 3 2 1 | 1 2 3 4 | 4 3 2 1 ,BAlso mirror like reflection, but without repeating the edge pixel. ' outside | Image | outside , : 1 4 3 2 | 1 2 3 4 | 3 2 1 4 -7Allows for changing an underlying image representation..9Exchange the underlying array representation of an image./,Array representation that supports mutation.1"Get dimensions of a mutable image.2!Yield a mutable copy of an image.3$Yield an immutable copy of an image.4GCreate a mutable image with given dimensions. Pixels are uninitialized.5$Yield the pixel at a given location.6 Set a pixel at a given location.7Swap pixels at given locations.8Array representation that allows computation, which depends on some specific order, consequently making it possible to be computed only sequentially.91Fold an image from the left in a row major order.:2Fold an image from the right in a row major order.;Monading mapping over an image.<4Monading mapping over an image. Result is discarded.?Array representation that is actually has real data stored in memory, hence allowing for image indexing, forcing pixels into computed state etc.@Get a pixel at i-th and j -th location.Ylet grad_gray = makeImage (200, 200) (\(i, j) -> PixelY $ fromIntegral (i*j)) / (200*200)8index grad_gray (20, 30) == PixelY ((20*30) / (200*200))TrueA+Make sure that an image is fully evaluated.BIPerform matrix multiplication on two images. Inner dimensions must agree.C!Undirected reduction of an image.DPixelwise equality function of two images. Images are considered distinct if either images' dimensions or at least one pair of corresponding pixels are not the same. Used in defining an in instance for the W typeclass.E,Base array like representation for an image.F9Required array specific constraints for an array element.G Underlying image representation.HNCreate an Image by supplying it's dimensions and a pixel generating function.ISCreate a singleton image, required for various operations on images with a scalar.JGet dimensions of an image.&frog <- readImageRGB "images/frog.jpg"frog+<Image VectorUnboxed RGB (Double): 200x320> dims frog (200,320)KMap a function over a an image.L8Map an index aware function over each pixel in an image.MZip two images with a functionN+Zip two images with an index aware functionOTraverse an imagePTraverse two images.QTranspose an imageR#Backwards permutation of an image. SmConstruct an image from a nested rectangular shaped list of pixels. Length of an outer list will constitute m* rows, while the length of inner lists - nJ columns. All of the inner lists must be the same length and greater than 0.TA class with a set of convenient functions that allow for changing precision of channels within pixels, while scaling the values to keep them in an appropriate range.2let rgb = PixelRGB 0.0 0.5 1.0 :: Pixel RGB Double toWord8 rgb<RGB:(0|128|255)>\)A color space that supports transparency.]4An corresponding opaque version of this color space.^-Get an alpha channel of a transparant pixel. _(Add an alpha channel of an opaque pixel. 1 addAlpha 0 (PixelHSI 1 2 3) == PixelHSIA 1 2 3 0`LConvert a transparent pixel to an opaque one by dropping the alpha channel. 0 dropAlpha (PixelRGBA 1 2 3 4) == PixelRGB 1 2 3a(Get a corresponding opaque channel type.bThis class has all included color spaces installed into it and is also intended for implementing any other possible custom color spaces. Every instance of this class automatically installs an associated d into X, Y, Z, [,  and \H, which in turn make it possible to be used by the rest of the library.cRepresentation of a pixel, such that it can be an element of any Array. Which is usally a tuple of channels or a channel itself for single channel color spaces.d=A concrete Pixel representation for a particular color space.eGConstrut a pixel by replicating a same value among all of the channels.fmConvert a Pixel to a representation suitable for storage as an unboxed element, usually a tuple of channels.g6Convert from an elemnt representation back to a Pixel.hRetrieve Pixel's channel valuei7Map a channel aware function over all Pixel's channels.j)Map a function over all Pixel's channels.k Function application to a Pixel.lA pixel eqiuvalent of ].m.Get a pure colour representation of a channel.nBorder handling function. If (i, j) location is within bounds, then supplied lookup function will be used, otherwise it will be handled according to a supplied border strategy.oOImage indexing function that returns a default pixel if index is out of bounds.p%Image indexing function that returns ^ if index is out of bounds, _ pixel otherwise.`DChanging to the same array representation as before is disabled and changeTo/ will behave simply as an identitity function.X'()*+,-.New representation of an image. Source image./0123456789:;<=>?@ABC An associative folding function.FInitial element, that is neutral with respect to the folding function. Source image.DEFGH(m rows, n& columns) - dimensions of a new image.A function that takes (i -th row, and jB-th column) as an argument and returns a pixel for that location.IJKnA function that takes a pixel of a source image and returns a pixel for the result image a the same location. Source image. Result image.LA function that takes an index (i, j)^, a pixel at that location and returns a new pixel at the same location for the result image. Source image. Result image.MNO Source image.XFunction that takes dimensions of a source image and returns dimensions of a new image.SFunction that receives a pixel getter (a source image index function), a location (i, j)7 in a new image and returns a pixel for that location.PFirst source image.Second source image.4Function that produces dimensions for the new image.0Function that produces pixels for the new image.QRDimensions of a result image.MFunction that maps an index of a source image to an index of a result image. Source image. Result image.STUVWXYZ[\]^_`abcdefghijklmnBorder handling strategy.Image dimensionsImage's indexing function.(i, j) location of a pixel lookup.opabcdefghijklm`U'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopUbcdefghijklm\]^_`aTUVWXYZ[EFGHIJKLMNOPQRS?@ABCD89:;<=>/01234567-.op'()*+,n'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`ab cdefghijklmnopabcdefghijklm` (c) Alexey Kuleshevich 2016BSD3%Alexey Kuleshevich <lehins@yandex.ru> experimental non-portableNone +345>L q?Conversion to Luma from another color space with Alpha channel.r)Convert a pixel to Luma pixel with Alpha.s*Convert an image to Luma image with Alpha.tConversion to Luma color space.uConvert a pixel to Luma pixel.vConvert an image to Luma image.wLuma with Alpha channel.xLumay Alpha channelz/Luma or brightness, that is usually denoted as Y'.qrstuvwxyz{nopqrstuvwxydqrstuvwxyz{no qrstuvwxyz{pqrstuwvnyxo(c) Alexey Kuleshevich 2016BSD3%Alexey Kuleshevich <lehins@yandex.ru> experimental non-portableNone +345>L|Conversion to - from another color space with Alpha channel.}Convert to an  pixel.~Convert to an  image.Conversion to  color space.Convert to an  pixel.Convert to an  image.3Red, Green and Blue color space with Alpha channel. Red, Green and Blue color space.|}~z{|}~d|}~z{ |}~|}~z{(c) Alexey Kuleshevich 2016BSD3%Alexey Kuleshevich <lehins@yandex.ru> experimental non-portableNone +345>LConversion to - from another color space with Alpha channel.Convert to an  pixel.Convert to an  image.Conversion to  color space.Convert to an  pixel.Convert to an  image.=Hue, Saturation and Intensity color space with Alpha channel.Hue Saturation IntensityAlpha*Hue, Saturation and Intensity color space.Hue Saturation  Intensityd (c) Alexey Kuleshevich 2016BSD3%Alexey Kuleshevich <lehins@yandex.ru> experimental non-portableNone +345>LConversion to - from another color space with Alpha channel. Convert to a  pixel. Convert to a  image.Conversion to  color space. Convert to a  pixel. Convert to a  image.?Cyan, Magenta, Yellow and Black color space with Alpha channel.CyanMagentaYellow Key (Black)Alpha ,Cyan, Magenta, Yellow and Black color space.CyanMagentaYellow Key (Black)d (c) Alexey Kuleshevich 2016BSD3%Alexey Kuleshevich <lehins@yandex.ru> experimental non-portableNone +345>LConversion to - from another color space with Alpha channel.Convert to an  pixel.Convert to an  image.Conversion to  color space.Convert to an  pixel.Convert to an  image.%YCbCr color space with Alpha channel.$Luma component (commonly denoted as Y') Blue difference chroma componentRed difference chroma componentAlpha component.NColor space is used to encode RGB information and is used in JPEG compression.$Luma component (commonly denoted as Y') Blue difference chroma componentRed difference chroma componentd (c) Alexey Kuleshevich 2016BSD3%Alexey Kuleshevich <lehins@yandex.ru> experimental non-portableNone +345>LNThis is a signgle channel colorspace, that is designed to hold any channel from any other colorspace, hence it is not convertible to and from, but rather is here to allow separation of channels from other multichannel colorspaces. If you are looking for a true grayscale colorspace   should be used instead.-Separate an image into a list of images with 8 pixels containing every channel from the source image.&frog <- readImageRGB "images/frog.jpg"9let [frog_red, frog_green, frog_blue] = toGrayImages frog4writeImage "images/frog_red.png" $ toImageY frog_red8writeImage "images/frog_green.jpg" $ toImageY frog_green6writeImage "images/frog_blue.jpg" $ toImageY frog_blue images/frog_red.jpg  images/frog_green.jpg images/frog_blue.jpgCombine a list of images with Y pixels into an image of any color space, by supplying an order of color space channels.(For example here is a frog with swapped BlueRGB and GreenRGB channels.owriteImage "images/frog_rbg.jpg" $ fromGrayImages [frog_red, frog_green, frog_blue] [RedRGB, BlueRGB, GreenRGB] images/frog.jpg images/frog_rbg.jpgIt is worth noting though, that separating image channels can be sometimes pretty useful, the same effect as above can be achieved in a much simpler and more efficient way: . map ((PixelRGB r g b) -> PixelRGB r b g) frog d(c) Alexey Kuleshevich 2016BSD3%Alexey Kuleshevich <lehins@yandex.ru> experimental non-portableNone PConstrcut a complex pixel from two pixels representing real and imaginary parts.  PixelRGB 4 8 6  PixelRGB 7 1 1 == PixelRGB (4  7) (8  1) (6  1)*Extracts the real part of a complex pixel./Extracts the imaginary part of a complex pixel.BForm a complex pixel from polar components of magnitude and phase. t9 is a complex pixel with magnitude 1 and phase t (modulo 2*). The function  takes a complex pixel and returns a (magnitude, phase) pair of pixels in canonical form: the magnitude is nonnegative, and the phase in the range (-, ]1; if the magnitude is zero, then so is the phase.-The nonnegative magnitude of a complex pixel.+The phase of a complex pixel, in the range (-, ]2. If the magnitude is zero, then so is the phase.!The conjugate of a complex pixel.  (c) Alexey Kuleshevich 2016BSD3%Alexey Kuleshevich <lehins@yandex.ru> experimental non-portableNone +345>L1Under the hood, Binary pixels are represented as  that can only take values of 0 or 1.JThis is a Binary colorspace, pixel's of which can be created using these  constructors: Represents value 1 or R7. It's a foreground pixel and is displayed in black.Represents value 0 or 7. It's a background pixel and is displayed in white.tNote, that values are inverted before writing to or reading from file, since grayscale images represent black as a 0 value and white as 1 on a [0,1] scale.OBinary pixels also behave as binary numbers with a size of 1-bit, for instance:!on + on -- equivalent to: 1 .|. 1 <Binary:(1)>1(on + on) * off -- equivalent to: (1 .|. 1) .&. 0 <Binary:(0)>(on + on) - on <Binary:(0)>Represents value R or 1? in binary. Often also called a foreground pixel of an object.Represents value  or 02 in binary. Often also called a background pixel. Convert a  to a PixelBin pixel.isOn (fromBool True)TrueTest if Pixel's value is .Test if Pixel's value is .'Invert value of a pixel. Equivalent of  for Bool's.  (c) Alexey Kuleshevich 2016BSD3%Alexey Kuleshevich <lehins@yandex.ru> experimental non-portableNone Bilinear interpolation method.&Nearest Neighbor interpolation method.+Implementation for an interpolation method.CConstruct a new pixel by using information from neighboring pixels.Interpolation methodImage dimensions m rows and n columns.(Lookup function that returns a pixel at ith and j th location.Real values of i and j index(c) Alexey Kuleshevich 2016BSD3%Alexey Kuleshevich <lehins@yandex.ru> experimental non-portableNone 0Downsample an image by discarding every odd row.3Downsample an image by discarding every odd column.;Downsample an image by discarding every odd row and column.VUpsample an image by inserting a row of back pixels after each row of a source image.\Upsample an image by inserting a column of back pixels after each column of a source image.pUpsample an image by inserting a row and a column of back pixels after each row and a column of a source image._Concatenate two images together into one. Both input images must have the same number of rows.bConcatenate two images together into one. Both input images must have the same number of columns.5Crop an image, i.e. retrieves a sub-image image with m rows and n columns. Make sure (m + i, n + j)3 is not greater than dimensions of a source image.Flip an image vertically.&frog <- readImageRGB "images/frog.jpg":writeImage "images/frog_flipV.jpg" (computeS $ flipV frog) images/frog.jpg images/frog_flipV.jpgFlip an image horizontally.&frog <- readImageRGB "images/frog.jpg"/writeImage "images/frog_flipH.jpg" (flipH frog) images/frog.jpg images/frog_flipH.jpg!Rotate an image clockwise by 90.&frog <- readImageRGB "images/frog.jpg"5writeImage "images/frog_rotate90.jpg" (rotate90 frog) images/frog.jpg images/frog_rotate90.jpgRotate an image by 180.&frog <- readImageRGB "images/frog.jpg"7writeImage "images/frog_rotate180.jpg" (rotate180 frog) images/frog.jpg images/frog_rotate180.jpg"Rotate an image clockwise by 270.&frog <- readImageRGB "images/frog.jpg"7writeImage "images/frog_rotate270.jpg" (rotate270 frog) images/frog.jpg images/frog_rotate270.jpg.Resize an image using an interpolation method.&frog <- readImageRGB "images/frog.jpg"LwriteImage "images/frog_resize.jpg" (resize (Bilinear Edge) (100, 640) frog) images/frog_resize.jpg_Scale an image. Same as resize, except scaling factors are supplied instead of new dimensions.  scale ( *) (0.5, 2) frog == resize ( *) (100, 640) frog(i, j)+ starting index from within a source image.(m, n) dimensions of a new image. Source image./Interpolation method to be used during scaling.Dimensions of a result image. Source image. Reuslt image./Interpolation method to be used during scaling.Positive scaling factors. Source image.(c) Alexey Kuleshevich 2016BSD3%Alexey Kuleshevich <lehins@yandex.ru> experimental non-portableNonePConvolution of an image using a kernel. Border resolution technique is required.KConvolve image's rows with a vector kernel represented by a list of pixels.NConvolve image's columns with a vector kernel represented by a list of pixels.%Approach to be used near the borders. Kernel image. Source image.(c) Alexey Kuleshevich 2016BSD3%Alexey Kuleshevich <lehins@yandex.ru> experimental non-portableNone This function magnifies an image by a positive factor and draws a grid around the original pixels. It is here simply as useful inspection tool.&frog <- readImageRGB "images/frog.jpg"SwriteImage "images/frog_eye_grid.png" $ pixelGrid 10 $ crop (51, 112) (20, 20) frog images/frog.jpg images/frog_eye_grid.pngMagnification factor. Source image. '()*+, '()*+,(c) Alexey Kuleshevich 2016BSD3%Alexey Kuleshevich <lehins@yandex.ru> experimental non-portableNone&4Fast Fourier TransformInverse Fast Fourier Transform Check if  is a power of two.ICompute the DFT of a matrix. Array dimensions must be powers of two else . (c) Alexey Kuleshevich 2016BSD3%Alexey Kuleshevich <lehins@yandex.ru> experimental non-portableNone4 PConstrcut a complex image from two images representing real and imaginary parts.&frog <- readImageRGB "images/frog.jpg" frog !+! 03<Image VectorUnboxed RGB (Complex Double): 200x320> frog !+! frog3<Image VectorUnboxed RGB (Complex Double): 200x320>*Extracts the real part of a complex image./Extracts the imaginary part of a complex image.BForm a complex image from polar components of magnitude and phase. t9 is a complex image with magnitude 1 and phase t (modulo 2*). The function  takes a complex image and returns a (magnitude, phase) pair of images in canonical form: the magnitude is nonnegative, and the phase in the range (-, ]1; if the magnitude is zero, then so is the phase.-The nonnegative magnitude of a complex image.+The phase of a complex image, in the range (-, ]2. If the magnitude is zero, then so is the phase.!The conjugate of a complex image.>Make a filter by using a function that works around a regular (x, y) coordinate system.&Apply a filter to an image created by . Dimensions of the filter. Both m and n have to be powers of 2, i.e. m == 2^k, where k is some integer. Source image.Filter. (c) Alexey Kuleshevich 2016BSD3%Alexey Kuleshevich <lehins@yandex.ru> experimental non-portableNone47>LUnboxing of a d.Unboxing of a . (c) Alexey Kuleshevich 2016BSD3%Alexey Kuleshevich <lehins@yandex.ru> experimental non-portableNone &3457>ILNUnboxed  representation.(Convert an image to a flattened Unboxed  . It is a O(1) opeartion.KtoUnboxedVector $ makeImage (3, 2) (\(i, j) -> PixelY $ fromIntegral (i+j))XfromList [<Luma:(0.0)>,<Luma:(1.0)>,<Luma:(1.0)>,<Luma:(2.0)>,<Luma:(2.0)>,<Luma:(3.0)>]'Construct a two dimensional image with m rows and n columns from a flat Unboxed  of length k . It is a O(1) opeartion. Make sure that  m * n = k.UfromUnboxedVector (200, 300) $ generate 60000 (\i -> PixelY $ fromIntegral i / 60000)#<Image VectorUnboxed Luma: 200x300> images/grad_fromVector.png+2D index conversion to a flat vector index.Vector to 2D index conversion. G (c) Alexey Kuleshevich 2016BSD3%Alexey Kuleshevich <lehins@yandex.ru> experimental non-portableNone &3457>LNRepa =nboxed Array representation, which is computed sequentially. Repa ;nboxed Array representation, which is computed in parallel.Repa Delayed Array representation, which allows for fusion of computation.JComputes an image in parallel and ensures that all elements are evaluated.KComputes an image sequentially and ensures that all elements are evaluated.=Delays an image, so further operations can be fused together.(O(1) - Changes to Vector representation.(O(1) - Changes to Vector representation.&O(1) - Changes to Repa representation.&O(1) - Changes to Repa representation.$O(1) - Changes computation strategy.#Computes delayed array in parallel.$O(1) - Changes computation strategy.$Computes delayed array sequentially.O(1) - Delays manifest array.O(1) - Delays manifest array.0  #  (c) Alexey Kuleshevich 2016BSD3%Alexey Kuleshevich <lehins@yandex.ru> experimental non-portableNone3457 "Convert any pixel to binary pixel.$Convert a Binary pixel to Luma pixel"Convert any image to binary image.$Convert a Binary image to Luma image Values are scaled to  [0.0, 1.0] range. Values are scaled to  [0.0, 1.0] range. Values are scaled to [0, 18446744073709551615] range.Values are scaled to [0, 4294967295] range.Values are scaled to  [0, 65535] range.Values are scaled to [0, 255] range.Computes Luma: + Y' = 0.299 * R' + 0.587 * G' + 0.114 * B' "    !"#$%&'(TUVWXYZ[\]bdqrstuvwxyz{no|}~z{tbd\]TUVWXYZ[z{wxytuvqrs|}~"    !"#$%&'((c) Alexey Kuleshevich 2016BSD3%Alexey Kuleshevich <lehins@yandex.ru> experimental non-portableNone 4N 'A single channel histogram of an image. UVector containing pixel counts. Index of a vector serves as an original pixel value. :Name of the channel that will be displayed in the legend. Color of a plotted line. 2Create a histogram per channel with 256 bins each. CGenerate a histogram with 256 bins for a single channel Gray image.'Write histograms into a PNG image file.&frog <- readImageRGB "images/frog.jpg"@writeHistograms "images/frog_histogram.png" $ getHistograms frog images/frog_histogram.pngKDisplay image histograms using an external program. Works the same way as  .&frog <- readImageRGB "images/frog.jpg"&displayHistograms $ getHistograms frog)IO action that writes histogram to file into a system temporary directory and spawns an external program that displays it. File is deleted after program is closed.*-Used for backwards compatibility with vector.      )*                 )*(c) Alexey Kuleshevich 2016BSD3%Alexey Kuleshevich <lehins@yandex.ru> experimental non-portableNone  3457>L$Tagged Image File Format image with .tif or .tiff extension.6Truevision Graphics Adapter image with .tga extension.%Portable Network Graphics image with .png extension.,Joint Photographic Experts Group image with .jpg or .jpeg extension.High-dynamic-range image with .hdr or .pic extension.'Graphics Interchange Format image with .gif extension.Bitmap image with .bmp extension.+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./ /0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~     ! #"%$'&+)(+*,--,./.(c) Alexey Kuleshevich 2016BSD3%Alexey Kuleshevich <lehins@yandex.ru> experimental non-portableNone3457>L#Netpbm: portable pixmap image with .ppm extension. $Netpbm: portable graymap image with .pgm extension."#Netpbm: portable bitmap image with .pbm extension.H !"#0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopq !"#? !"#0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdegfihkjmlonqp(c) Alexey Kuleshevich 2016BSD3%Alexey Kuleshevich <lehins@yandex.ru> experimental non-portableNone 3457>L$LA collection of all image formats that can be written from HIP images with r precision pixel channels.%IA collection of all image formats that can be read into HIP images with r precision pixel channels.$stuvwxy%z{|}~,  !"#$%& !"#$%,  "# !%$ !"#$%&$stuvwxy%z{|}~ (c) Alexey Kuleshevich 2016BSD3%Alexey Kuleshevich <lehins@yandex.ru> experimental non-portableNone4&This function will try to guess an image format from file's extension, then it will attempt to read it as such. It will fall back onto the rest of the supported formats and will try to read them regarless of file's extension. Whenever image cannot be decoded, H containing all errors for each attempted format will be returned, and T containing an image otherwise. Image will be read into a type signature specified b (z, w,  and  only) with r2 precision, while doing all necessary conversions.'This function allows for reading any supported image in the exact colorspace and precision it is currently encoded in. For instance, frog image can be read into it's  colorspace with 8 precision and into any supported array representation.QreadImageExact JPG "images/frog.jpg" :: IO (Either String (Image RP YCbCr Word8))1Right <Image RepaParallel YCbCr (Word8): 200x320>lThe drawback here is that colorspace and precision has to match exactly, otherwise it will return an error:OreadImageExact JPG "images/frog.jpg" :: IO (Either String (Image RD RGB Word8))Left "JuicyPixel decoding error: Input image is in YCbCr8 (Pixel YCbCr Word8), cannot convert it to RGB8 (Pixel RGB Word8) colorspace."Attempt to read an image in a particular color space that is not supported by the format, will result in a compile error. Refer to  + class for all images that can be decoded.( Just like &s, this function will guess an output file format from the extension and write to file any image that is in one of z, w,  or  bs with r precision. While doing necessary conversions the choice will be given to the most suited color space supported by the format, for instance, in case of a  format, an (G arr  r) would be written as I16, hence preserving transparency and using highest supported precision +. At the same time, writing that image in  format would save it in RGB8, since  is the highest precision > supports and it currently cannot be saved with transparency.).Write an image in a specific format, while supplying any format specific options. Precision and color space that an image will be written is decided from image's type. Attempt to write image file in a format that does not support color space and precision combination will result in a compile error.*;Sets the program to be use when displaying an image, where U specifies if current thread should block until the program is closed when calling + function. GPicView ("gpicview", False)N is set as a default program with a nonblocking flag. Here are some examples:NsetDisplayProgram ("gpicview", True) -- use gpicview and block current thread.MsetDisplayProgram ("gimp", False) -- use gimp and don't block current thread.setDisplayProgram ("xv", False)$setDisplayProgram ("display", False)+HMakes a call to the current display program, which can be changed using *. An image is written as a .tiff file into an operating system's temporary directory and passed as an argument to the display program. If a blocking flag was set to  using *., then function will return immediately with (_ ^), otherwise it will block current thread until external program is terminated, in which case ^W is returned. Temporary file is deleted, after a program displaying an image is closed.&frog <- readImageRGB "images/frog.jpg"displayImage frogJust ThreadId 505 setDisplayProgram ("gimp", True);displayImage frog -- will only return after gimp is closed.Nothing&'4A file format that an image should be read as. See #g:4Supported Image FormatsLocation of an image.(*Location where an image should be written.An image to write. )5A file format that an image should be saved in. See #g:4Supported Image Formats"A list of format specific options.*Location where an image should be written.TAn image to write. Can be a list of images in case of formats supporting animation.*+Image to be displayed2  !"#$%& !"#$%&'()*+&'()+*&'()*+(c) Alexey Kuleshevich 2016BSD3%Alexey Kuleshevich <lehins@yandex.ru> experimental non-portableNone4,Create an image with / (Vector Unboxed) representation and pixels of r precision. Note, that for rD precision pixels it is essential to keep values normalized in the [0, 1]= range in order for an image to be written to file properly.dlet grad_gray = makeImage (200, 200) (\(i, j) -> PixelY (fromIntegral i)/200 * (fromIntegral j)/200) Because all ds and Gs are installed into X, above is equivalent to:Ylet grad_gray = makeImage (200, 200) (\(i, j) -> PixelY $ fromIntegral (i*j)) / (200*200)+writeImage "images/grad_gray.png" grad_gray&Creating color images is just as easy.zlet grad_color = makeImage (200, 200) (\(i, j) -> PixelRGB (fromIntegral i) (fromIntegral j) (fromIntegral (i + j))) / 400-writeImage "images/grad_color.png" grad_color images/grad_gray.png images/grad_color.png-mConstruct an image from a nested rectangular shaped list of pixels. Length of an outer list will constitute m* rows, while the length of inner lists - nJ columns. All of the inner lists must be the same length and greater than 0.QfromLists [[PixelY (fromIntegral (i*j) / 60000) | j <- [1..300]] | i <- [1..200]])<Image VectorUnboxed Y (Double): 200x300> images/grad_fromLists.png. Read image as luma (brightness)./Read image as luma with \ channel.0Read image in RGB colorspace.1"Read image in RGB colorspace with \ channel.,(m rows, n& columns) - dimensions of a new image.A function that takes (i -th row, and jB-th column) as an argument and returns a pixel for that location.-./01 ,-./01 ,-./01,-./01(c) Alexey Kuleshevich 2016BSD3%Alexey Kuleshevich <lehins@yandex.ru> experimental non-portableNone42,Create a delayed representation of an image.3CConstruct an image from a nested rectangular shaped list of pixels.4 Read image as luma (brightness).5Read image as luma with \ channel.6Read image in RGB colorspace.7"Read image in RGB colorspace with \ channel.2(m rows, n& columns) - dimensions of a new image.A function that takes (i -th row, and jB-th column) as an argument and returns a pixel for that location.34567234567234567234567 (c) Alexey Kuleshevich 2016BSD3%Alexey Kuleshevich <lehins@yandex.ru> experimental non-portableNone34579 88 contains a convenient set of functions for binary image construction, which is done by comparing either a single pixel with every pixel in an image or two same size images pointwise.? Pixel wise AND operator on binary images. @ Pixel wise OR operator on binary images.A"Complement each pixel in the imageB?Construct a binary image using a predicate from a source image.CBConstruct a binary image using a predicate from two source images.D3Threshold a source image with an applicative pixel.(yield <- readImageRGB "images/yield.jpg"dwriteImageExact PNG [] "images/yield_bin.png" $ thresholdWith (PixelRGB (>0.55) (<0.6) (<0.5)) yield images/yield.jpg images/yield_bin.pngE?Compare two images with an applicative pixel. Works just like D, but on two images.FErosion is defined as: {E = B " S = {m,n|S "B}gwriteImageExact PNG [] "images/figure_erode.png" $ pixelGrid 10 $ fromImageBinary $ erode struct figure images/figure.png eroded with  images/struct.png is images/figure_erode.pngGDialation is defined as: {D = B " S = {m,n|S ")B"`"}kwriteImageExact PNG [] "images/figure_dialate.png" $ pixelGrid 10 $ fromImageBinary $ dialate struct figure images/figure.png dialated with  images/struct.png is images/figure_dialate.pngHOpening is defined as: {B % S = (B " S) " S}ewriteImageExact PNG [] "images/figure_open.png" $ pixelGrid 10 $ fromImageBinary $ open struct figure images/figure.png opened with  images/struct.png is images/figure_open.pngIClosing is defined as: {B % S = (B " S) " S}gwriteImageExact PNG [] "images/figure_close.png" $ pixelGrid 10 $ fromImageBinary $ close struct figure images/figure.png closed with  images/struct.png is images/figure_close.png89:;<=>?@AB Predicate Source image.C PredicateFirst source image.Second source image.D5Pixel containing a thresholding function per channel. Source image.E2Pixel containing a comparing function per channel. First image. second image.FStructuring element.Binary source image.GStructuring element.Binary source image.HStructuring element.Binary source image.IStructuring element.Binary source image.89:;<=>?@ABCDEFGHIBCDE?@A89:;<=>FGHI89:;<=>?@ABCDEFGHI9:;<=>?@ (c) Alexey Kuleshevich 2016BSD3%Alexey Kuleshevich <lehins@yandex.ru> experimental non-portableNone'()*+,-/08?EGTUVWXYZ[\]bdqrstuvwxyz{no|}~z{EG?8/0-'()*+, (c) Alexey Kuleshevich 2016BSD3%Alexey Kuleshevich <lehins@yandex.ru> experimental non-portableNone4J#Get the number of rows in an image.&frog <- readImageRGB "images/frog.jpg"frog+<Image VectorUnboxed RGB (Double): 200x320> rows frog200K&Get the number of columns in an image.&frog <- readImageRGB "images/frog.jpg"frog+<Image VectorUnboxed RGB (Double): 200x320> cols frog320LSum all pixels in the image.M!Multiply all pixels in the image.N(Retrieve the biggest pixel from an imageO)Retrieve the smallest pixel from an imageP,Scales all of the pixels to be in the range [0, 1].JKLMNOP(.@BCJKLMNOPQRop'()+,-./01JKLMNOP(,-./01'()+JKJ@opKLMNOPQRBCLMNOP.JKLMNOP!"#!"$!"%!&'!&(!&)!&*+,-+,.+,/+,0+,1+23+24+25+26+27+28+29+29!":!";!<=!<>!?@!"A!"B!"C!"D!"E F G H I J K L M NOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~             !"#$%%&'()*+,--..//0011223344556678 9 : ; < = p{>?@Ap{>?@A B C D E F G H I J K L M N O P Q R S T U V W X Y Z[\]^_` a b c d^ef!gh!ij!kl!"m!no!np!"q!"rstuvwxyz{|}~            !k^_^_^e^_!      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijkl67mnopqrstuv^_wxyz{|}~!!!  5   hip_FwCRPuzXcXu1nkfec5NmxnGraphics.Image.InterfaceGraphics.Image.ColorSpaceGraphics.Image.IO.ExternalGraphics.Image.Processing!Graphics.Image.Processing.ComplexGraphics.Image.Interface.VectorGraphics.Image.Interface.RepaGraphics.Image.IO.HistogramGraphics.Image.IO Graphics.Image.Processing.BinaryGraphics.ImageGraphics.Image.IO.BaseGraphics.Image.ColorSpace.LumaGraphics.Image.ColorSpace.RGBGraphics.Image.ColorSpace.HSIGraphics.Image.ColorSpace.CMYKGraphics.Image.ColorSpace.YCbCrGraphics.Image.ColorSpace.GrayY!Graphics.Image.ColorSpace.Complex Graphics.Image.ColorSpace.Binary'Graphics.Image.Processing.Interpolation#Graphics.Image.Processing.Geometric%Graphics.Image.Processing.Convolution)Graphics.Image.Processing.Complex.Fourier(Graphics.Image.Interface.Vector.Unboxing'Graphics.Image.Interface.Vector.Unboxed&Graphics.Image.Interface.Repa.Internal displayImage&Graphics.Image.IO.External.JuicyPixels!Graphics.Image.IO.External.NetpbmGraphics.Image.TypesbaseGHC.Base<*>pure ApplicativeGHC.WordWord8Word16Word32Word64Juicy_0odXxVZPTosHTspVfzjiK9Codec.Picture.GifGifDelay LoopingRepeatLoopingForever LoopingNever GifLoopingCodec.Picture.ColorQuantUniform MedianMeanCutPaletteCreationMethodpaletteColorCountenableImageDitheringpaletteCreationMethodPaletteOptions<**> Data.Complex:+Complex Data.Functor<$>liftA3liftA2liftA<**><$WritableencodeReadabledecode ImageFormat SaveOptionextextsisFormatBorderFillWrapEdgeReflectContinue Exchangableexchange MutableArrayMImagemdimsthawfreezenewreadwriteswapSequentialArrayfoldlfoldrmapMmapM_foldMfoldM_ ManifestArrayindex deepSeqImage|*|foldeqArrayEltImage makeImage singletondimsmapimapzipWithizipWithtraverse traverse2 transpose backpermute fromListsElevatortoWord8toWord16toWord32toWord64toFloattoDouble fromDoubleAlphaOpaquegetAlphaaddAlpha dropAlphaopaque ColorSpacePixelEltPixel fromChanneltoEltfromEltgetPxChchOppxOpchApp pxFoldMapcsColour borderIndex defaultIndex maybeIndexToYA toPixelYA toImageYAToYtoPixelYtoImageYYAAlphaYAToRGBA toPixelRGBA toImageRGBAToRGB toPixelRGB toImageRGBRGBARedRGBA GreenRGBABlueRGBA AlphaRGBARGBRedRGBGreenRGBBlueRGBToHSIA toPixelHSIA toImageHSIAToHSI toPixelHSI toImageHSIHSIAHueHSIASatHSIAIntHSIA AlphaHSIAHSIHueHSISatHSIIntHSIToCMYKA toPixelCMYKA toImageCMYKAToCMYK toPixelCMYK toImageCMYKCMYKA CyanCMYKAMagCMYKAYelCMYKAKeyCMYKA AlphaCMYKACMYKCyanCMYKMagCMYKYelCMYKKeyCMYKToYCbCrA toPixelYCbCrA toImageYCbCrAToYCbCr toPixelYCbCr toImageYCbCrYCbCrA LumaYCbCrA CBlueYCbCrA CRedYCbCrA AlphaYCbCrAYCbCr LumaYCbCr CBlueYCbCr CRedYCbCrGray toGrayImagesfromGrayImages+:realPartimagPartmkPolarcispolar magnitudephase conjugateBitBinaryonofffromBoolisOnisOff complementBilinearNearest Interpolation interpolatedownsampleRowsdownsampleCols downsample upsampleRows upsampleColsupsample leftToRight topToBottomcropflipVflipHrotate90 rotate180 rotate270resizescaleconvolve convolveRows convolveCols pixelGridfftifft!+! realPart' imagPart'mkPolar'cis'polar' magnitude'phase' conjugate' makeFilter applyFilterVUtoUnboxedVectorfromUnboxedVectorRSRPRDcomputePcomputeSdelay toPixelBinaryfromPixelBinary toImageBinaryfromImageBinary HistogramhBinshNamehColour getHistograms getHistogramwriteHistogramsdisplayHistogramsTIFTGAPNGJPGHDRGIFBMPPPMPGMPBM OutputFormat InputFormat readImagereadImageExact writeImagewriteImageExactsetDisplayProgram readImageY readImageYA readImageRGB readImageRGBA Thresholding.==../=..<..<=..>..>=..&&..||.inverttoImageBinaryUsingtoImageBinaryUsing2 thresholdWith compareWitherodedialateopencloserowscolssumproductmaximumminimum normalizebytes_6VWy06pWzJq9evDvK2d4w6Data.ByteString.Lazy.Internal ByteStringghc-prim GHC.TypesTrue ConvertibledisplayProgram spawnProcessconvert GHC.ClassesEqGHC.NumNumGHC.Real Fractional GHC.FloatFloatingFunctor Data.FoldableFoldablefoldMapNothingJust$fExchangablearrarr $fShowMImage $fShowImage $fNFDataImage$fFloatingImage$fFractionalImage $fNumImage $fEqImage$fFloatingPixel$fFractionalPixel $fNumPixel$fFoldablePixel$fApplicativePixel$fFunctorPixelPixelYAPixelY $fMonadPixel $fShowPixel $fShowPixel0$fShowYA$fShowY $fAlphaYATFCo:R:PixelYAe$fColorSpaceYATFCo:R:PixelYe $fColorSpaceY PixelRGBAPixelRGB $fShowRGBA $fShowRGB $fAlphaRGBATFCo:R:PixelRGBAe$fColorSpaceRGBATFCo:R:PixelRGBe$fColorSpaceRGB PixelHSIAPixelHSI $fShowHSIA $fShowHSI $fAlphaHSIATFCo:R:PixelHSIAe$fColorSpaceHSIATFCo:R:PixelHSIe$fColorSpaceHSI PixelCMYKA PixelCMYK $fShowCMYKA $fShowCMYK $fAlphaCMYKATFCo:R:PixelCMYKAe$fColorSpaceCMYKATFCo:R:PixelCMYKe$fColorSpaceCMYK PixelYCbCrA PixelYCbCr $fShowYCbCrA $fShowYCbCr $fAlphaYCbCrATFCo:R:PixelYCbCrAe$fColorSpaceYCbCrATFCo:R:PixelYCbCre$fColorSpaceYCbCr PixelGrayTFCo:R:PixelGraye$fColorSpaceGraypiFalseBoolnot PixelBinary$fNumBitTFCo:R:PixelBinarye$fColorSpaceBinary$fInterpolationBilinear$fInterpolationNearest downsampleF upsampleF flipUsing convolve'' isPowerOfTwoIntfft2dGHC.ErrerrorModeForwardInverse signOfMode fftGeneraltwiddle $fUnboxPixel $fUnboxBitV_PixelMV_PixelV_BitMV_Bit$fVectorVectorPixelTFCo:R:VectorPixel$fMVectorMVectorPixelTFCo:R:MVectorsPixel$fVectorVectorBitTFCo:R:VectorBit$fMVectorMVectorBitTFCo:R:MVectorsBitvecto_Hlsuo0rfZGxDZa3vCL7yzyData.Vector.Unboxed.BaseVectorfromIxtoIxMVImageMVScalarVScalarVUImageTFCo:R:MImagestVUcse$fMutableArrayVUcse$fSequentialArrayVUcse$fManifestArrayVUcseTFCo:R:ImageVUcse $fArrayVUcse$fShowVUrepa_CO6Oe3Uy2D4Koy0WEVVfrRData.Array.Repa.Repr.UnboxedUData.Array.Repa.Repr.DelayedD$fExchangableRPVU$fExchangableRSVU$fExchangableVURP$fExchangableVURS$fExchangableRSRP$fExchangableRDRP$fExchangableRPRS$fExchangableRDRS$fExchangableRPRD$fExchangableRSRDMRSImageRPImageRSImageRScalarRUImageRDImagemultshT2tSh2suspendedComputeP getDelayed_error_compute_error_scalar_op $fEltPixel$fEltBitTFCo:R:MImagestRScse$fMutableArrayRScse$fSequentialArrayRScse$fManifestArrayRPcse$fManifestArrayRScseTFCo:R:ImageRPcse $fArrayRPcseTFCo:R:ImageRScse $fArrayRScseTFCo:R:ImageRDcse $fArrayRDcse$fShowRS$fShowRP$fShowRD$fElevatorDouble$fElevatorFloat$fElevatorWord64$fElevatorWord32$fElevatorWord16$fElevatorWord8$fToYRGB $fToCMYKARGBA $fToCMYKRGB$fToYCbCrARGBA $fToYCbCrRGB $fToHSIARGBA $fToHSIRGB $fToHSIAYA$fToHSIY $fToRGBACMYKA $fToRGBCMYK$fToRGBAYCbCrA $fToRGBYCbCr $fToRGBAHSIA $fToRGBHSI $fToRGBAYA$fToRGBY $fToYAYCbCrA $fToYYCbCr $fToYCMYK $fToYAHSIA$fToYHSI $fToYARGBA $fToYGray displayUsingmodify JPGQuality GIFsPalette GIFsLooping GIFPalette decodeGifsjpImageToImagejpImageY8ToImagejpImageY16ToImagejpImageYA8ToImagejpImageYA16ToImagejpImageRGB8ToImagejpImageRGB16ToImagejpImageRGBFToImagejpImageRGBA8ToImagejpImageRGBA16ToImagejpImageYCbCr8ToImagejpImageCMYK8ToImagejpImageCMYK16ToImagejpDynamicImageToImage'jpDynamicImageToImage jpImageShowCSjpError jpCSError encodeGIF encodeGIFs encodeJPGimageToJPImage$fWritableImageTIF$fWritableImageTIF0$fWritableImageTIF1$fWritableImageTIF2$fWritableImageTIF3$fWritableImageTIF4$fWritableImageTIF5$fWritableImageTIF6$fWritableImageTIF7$fWritableImageTIF8$fWritableImageTIF9$fWritableImageTIF10$fWritableImageTIF11$fWritableImageTIF12$fWritableImageTIF13$fWritableImageTIF14$fWritableImageTIF15$fWritableImageTIF16$fWritableImageTGA$fWritableImageTGA0$fWritableImageTGA1$fWritableImageTGA2$fWritableImageTGA3$fWritableImageTGA4$fWritableImageTGA5$fWritableImageTGA6$fWritableImagePNG$fWritableImagePNG0$fWritableImagePNG1$fWritableImagePNG2$fWritableImagePNG3$fWritableImagePNG4$fWritableImagePNG5$fWritableImagePNG6$fWritableImagePNG7$fWritableImagePNG8$fWritableImagePNG9$fWritableImagePNG10$fWritableImagePNG11$fWritableImageJPG$fWritableImageJPG0$fWritableImageJPG1$fWritableImageJPG2$fWritableImageJPG3$fWritableImageJPG4$fWritableImageJPG5$fWritableImageJPG6$fWritableImageJPG7$fWritableImageHDR$fWritableImageHDR0$fWritableImageHDR1$fWritableImageHDR2$fWritableImageHDR3$fWritable[][]$fWritable[][]0$fWritableImageGIF$fWritableImageGIF0$fWritableImageGIF1$fWritableImageGIF2$fWritableImageGIF3$fWritableImageBMP$fWritableImageBMP0$fWritableImageBMP1$fWritableImageBMP2$fWritableImageBMP3$fWritableImageBMP4$fWritableImageBMP5$fWritableImageBMP6$fReadableImageTIF$fReadableImageTIF0$fReadableImageTIF1$fReadableImageTIF2$fReadableImageTIF3$fReadableImageTIF4$fReadableImageTIF5$fReadableImageTIF6$fReadableImageTIF7$fReadableImageTIF8$fReadableImageTIF9$fReadableImageTIF10$fReadableImageTIF11$fReadableImageTIF12$fReadableImageTIF13$fReadableImageTGA$fReadableImageTGA0$fReadableImageTGA1$fReadableImageTGA2$fReadableImageTGA3$fReadableImageTGA4$fReadableImageTGA5$fReadableImageTGA6$fReadableImagePNG$fReadableImagePNG0$fReadableImagePNG1$fReadableImagePNG2$fReadableImagePNG3$fReadableImagePNG4$fReadableImagePNG5$fReadableImagePNG6$fReadableImagePNG7$fReadableImagePNG8$fReadableImagePNG9$fReadableImagePNG10$fReadableImagePNG11$fReadableImageJPG$fReadableImageJPG0$fReadableImageJPG1$fReadableImageJPG2$fReadableImageJPG3$fReadableImageJPG4$fReadableImageJPG5$fReadableImageJPG6$fReadableImageJPG7$fReadableImageHDR$fReadableImageHDR0$fReadableImageHDR1$fReadableImageHDR2$fReadableImageHDR3$fReadable[][]$fReadable[][]0$fReadable[][]1$fReadable[][]2$fReadable[][]3$fReadable[][]4$fReadableImageGIF$fReadableImageGIF0$fReadableImageGIF1$fReadableImageGIF2$fReadableImageGIF3$fReadableImageGIF4$fReadableImageBMP$fReadableImageBMP0$fReadableImageBMP1$fReadableImageBMP2$fReadableImageBMP3$fReadableImageBMP4$fReadableImageBMP5$fReadableImageBMP6$fConvertiblePixelPixelCMYK16$fConvertiblePixelPixelCMYK8$fConvertiblePixelPixelYCbCr8$fConvertiblePixelPixelRGBA16$fConvertiblePixelPixelRGBA8$fConvertiblePixelPixelRGBF$fConvertiblePixelPixelRGB16$fConvertiblePixelPixelRGB8$fConvertiblePixelPixelYA16$fConvertiblePixelPixelYA8$fConvertiblePixelFloat$fConvertiblePixelWord32$fConvertiblePixelWord16$fConvertiblePixelWord8$fConvertiblePixelCMYK16Pixel$fConvertiblePixelCMYK8Pixel$fConvertiblePixelYCbCr8Pixel$fConvertiblePixelRGBA16Pixel$fConvertiblePixelRGBA8Pixel$fConvertiblePixelRGBFPixel$fConvertiblePixelRGB16Pixel$fConvertiblePixelRGB8Pixel$fConvertiblePixelYA16Pixel$fConvertiblePixelYA8Pixel$fConvertibleFloatPixel$fConvertibleWord32Pixel$fConvertibleWord16Pixel$fConvertibleWord8Pixel$fConvertiblePixelRGBA16Pixel0$fConvertiblePixelRGBA8Pixel0$fConvertiblePixelYCbCr8Pixel0$fConvertiblePixelCMYK16Pixel0$fConvertiblePixelCMYK8Pixel0$fConvertiblePixelRGBFPixel0$fConvertiblePixelRGB16Pixel0$fConvertiblePixelRGB8Pixel0$fConvertiblePixelYA16Pixel0$fConvertiblePixelYA8Pixel0$fConvertibleFloatPixel0$fConvertibleWord16Pixel0$fConvertibleWord8Pixel0$fConvertiblePixelCMYK16Pixel1$fConvertiblePixelCMYK8Pixel1$fConvertiblePixelYCbCr8Pixel1$fConvertiblePixelRGBFPixel1$fConvertiblePixelRGBA16Pixel1$fConvertiblePixelRGBA8Pixel1$fConvertiblePixelRGB16Pixel1$fConvertiblePixelRGB8Pixel1$fConvertiblePixelYA16Pixel1$fConvertiblePixelYA8Pixel1$fConvertibleFloatPixel1$fConvertibleWord16Pixel1$fConvertibleWord8Pixel1$fConvertiblePixelRGBA16Pixel2$fConvertiblePixelRGBA8Pixel2$fConvertiblePixelYCbCr8Pixel2$fConvertiblePixelCMYK16Pixel2$fConvertiblePixelCMYK8Pixel2$fConvertiblePixelRGBFPixel2$fConvertiblePixelRGB16Pixel2$fConvertiblePixelRGB8Pixel2$fConvertiblePixelYCbCr8Pixel3$fConvertiblePixelCMYK16Pixel3$fConvertiblePixelCMYK8Pixel3$fConvertiblePixelRGBFPixel3$fConvertiblePixelRGBA16Pixel3$fConvertiblePixelRGBA8Pixel3$fConvertiblePixelRGB16Pixel3$fConvertiblePixelRGB8Pixel3$fConvertiblePixelYA16Pixel2$fConvertiblePixelYA8Pixel2$fConvertibleFloatPixel2$fConvertibleWord16Pixel2$fConvertibleWord8Pixel2$fConvertiblePixelYA16Pixel3$fConvertiblePixelYA8Pixel3$fConvertibleFloatPixel3$fConvertibleWord16Pixel3$fConvertibleWord8Pixel3TFCo:R:SaveOptionTIF$fImageFormatTIFTFCo:R:SaveOptionTGA$fImageFormatTGATFCo:R:SaveOptionPNG$fImageFormatPNGTFCo:R:SaveOptionJPG$fImageFormatJPGTFCo:R:SaveOptionHDR$fImageFormatHDRTFCo:R:SaveOption[]$fImageFormat[]TFCo:R:SaveOptionGIF$fImageFormatGIFTFCo:R:SaveOptionBMP$fImageFormatBMPpnmToImagesUsinggetPxpnmDataToImagepnmDataPBMToImagepnmDataPGM8ToImagepnmDataPGM16ToImagepnmDataPPM8ToImagepnmDataPPM16ToImageppmToImageUsing decodePnmpnmError pnmCSError pnmShowData$fReadableImagePPM$fReadableImagePPM0$fReadableImagePGM$fReadableImagePGM0$fReadableImagePBM$fReadableImagePPM1$fReadableImagePPM2$fReadableImagePPM3$fReadableImagePPM4$fReadableImagePGM1$fReadableImagePBM0$fConvertiblePpmPixelRGB16Pixel$fConvertiblePpmPixelRGB8Pixel$fConvertiblePgmPixel16Pixel$fConvertiblePgmPixel8Pixel$fConvertiblePbmPixelPixel $fConvertiblePpmPixelRGB16Pixel0$fConvertiblePpmPixelRGB8Pixel0$fConvertiblePgmPixel16Pixel0$fConvertiblePgmPixel8Pixel0$fConvertiblePbmPixelPixel0 $fConvertiblePpmPixelRGB16Pixel1$fConvertiblePpmPixelRGB8Pixel1$fConvertiblePgmPixel16Pixel1$fConvertiblePgmPixel8Pixel1$fConvertiblePbmPixelPixel1 $fConvertiblePpmPixelRGB16Pixel2$fConvertiblePpmPixelRGB8Pixel2$fConvertiblePgmPixel16Pixel2$fConvertiblePgmPixel8Pixel2$fConvertiblePbmPixelPixel2 $fConvertiblePpmPixelRGB16Pixel3$fConvertiblePpmPixelRGB8Pixel3$fConvertiblePgmPixel16Pixel3$fConvertiblePgmPixel8Pixel3$fConvertiblePbmPixelPixel3TFCo:R:SaveOption[]0$fImageFormat[]0TFCo:R:SaveOption[]1$fImageFormat[]1TFCo:R:SaveOptionPPM$fImageFormatPPMTFCo:R:SaveOptionPGM$fImageFormatPGMTFCo:R:SaveOptionPBM$fImageFormatPBMDouble OutputBMP OutputGIF OutputHDR OutputJPG OutputPNG OutputTIF OutputTGAInputBMPInputGIFInputHDRInputJPGInputPNGInputTIFInputPNMInputTGA$fWritableImageOutputFormatTFCo:R:SaveOptionOutputFormat$fImageFormatOutputFormat$fReadableImageInputFormatTFCo:R:SaveOptionInputFormat$fImageFormatInputFormat Data.EitherLeftRight GHC.Conc.SyncThreadId guessFormat$fThresholdingImagePixelarr$fThresholdingPixelImagearr$fThresholdingImageImagearr