[{"name":"Image","comment":"\n\n@docs Image\n\n\n# Decoding\n\n@docs decode\n\n\n# Encoding\n\n@docs toPng, toBmp, toPngUrl, toBmpUrl\n\n\n# Construct\n\n@docs fromList, fromList2d, fromArray, fromArray2d\n\n\n# Destruct\n\n@docs toList, toList2d, toArray, toArray2d\n\n\n# Meta Data\n\n@docs dimensions\n\n\n# Helper Types\n\n@docs Pixel, Width, Height\n\n","unions":[],"aliases":[{"name":"Height","comment":" ","args":[],"type":"Basics.Int"},{"name":"Image","comment":" Data Model representing Image data, that can be used to create image, or convert primitives to use image pixels as data\n","args":[],"type":"Image.Internal.ImageData.Image"},{"name":"Pixel","comment":" Color encoded as `0xRRGGBBAA`\n","args":[],"type":"Basics.Int"},{"name":"Width","comment":" ","args":[],"type":"Basics.Int"}],"values":[{"name":"decode","comment":" Convert blob of image (`png` or `bmp`) into [`Image`](#Image)\n\n    import Http\n\n    type Msg\n        = GotImage (Result Http.Error (Maybe Image))\n\n    getImage : Cmd Msg\n    getImage =\n        Http.get\n            { url = \"/image.png\"\n            , expect = Http.expectBytes GotImage Image.decode\n            }\n\n","type":"Bytes.Bytes -> Maybe.Maybe Image.Image"},{"name":"dimensions","comment":" Get `width` and `height` of [`Image`](#Image)\n","type":"Image.Image -> { width : Basics.Int, height : Basics.Int }"},{"name":"fromArray","comment":" Create [`Image`](#Image) of `Array Int` where each `Pixel` is `Int` as `0xRRGGBBAA`\n","type":"Image.Width -> Array.Array Image.Pixel -> Image.Image"},{"name":"fromArray2d","comment":" Create [`Image`](#Image) of `Array (Array Pixel)` where each `Pixel` is `Int` as `0xRRGGBBAA`\n","type":"Array.Array (Array.Array Image.Pixel) -> Image.Image"},{"name":"fromList","comment":" Create [`Image`](#Image) of `List Int` where each `Pixel` is `Int` as `0xRRGGBBAA`\n","type":"Image.Width -> List.List Image.Pixel -> Image.Image"},{"name":"fromList2d","comment":" Create [`Image`](#Image) of `List (List Int)` where each `Pixel` is `Int` as `0xRRGGBBAA`\n","type":"List.List (List.List Image.Pixel) -> Image.Image"},{"name":"toArray","comment":" Take [`Image`](#Image) of and converts it to `Array Pixel` where each `Pixel` is `Int` as `0xRRGGBBAA`\n","type":"Image.Image -> Array.Array Image.Pixel"},{"name":"toArray2d","comment":" Take [`Image`](#Image) of and converts it to matrix `Array (Array Pixel)` where each `Pixel` is `Int` as `0xRRGGBBAA`\n","type":"Image.Image -> Array.Array (Array.Array Image.Pixel)"},{"name":"toBmp","comment":" The BMP file format, also known as bitmap image file or device independent bitmap (DIB) file format or simply a bitmap, is a raster graphics image file format used to store bitmap digital images, independently of the display device (such as a graphics adapter), especially on Microsoft Windows and OS/2 operating systems.\n\n**Note**: Using BMP 32bit is discouraged due to lack of proper support across browsers, so image will be 24bit (no alpha channel)\n\n","type":"Image.Image -> Bytes.Bytes"},{"name":"toBmpUrl","comment":" Create base64-url that can be used directly as img source (`img [ src <| toBmpUrl myImage ]`)\n","type":"Image.Image -> String.String"},{"name":"toList","comment":" Take [`Image`](#Image) of and converts it to `List Pixel` where each `Pixel` is `Int` as `0xRRGGBBAA`\n","type":"Image.Image -> List.List Image.Pixel"},{"name":"toList2d","comment":" Take [`Image`](#Image) of and converts it to matrix `List (List Pixel)` where each `Pixel` is `Int` as `0xRRGGBBAA`\n","type":"Image.Image -> List.List (List.List Image.Pixel)"},{"name":"toPng","comment":" Portable Network Graphics (PNG) is a raster-graphics file-format that supports lossless data compression. PNG was developed as an improved, non-patented replacement for Graphics Interchange Format (GIF).\n\nPNG supports palette-based images (with palettes of 24-bit RGB or 32-bit RGBA colors), grayscale images (with or without alpha channel for transparency), and full-color non-palette-based RGB images (with or without alpha channel).\n\n","type":"Image.Image -> Bytes.Bytes"},{"name":"toPngUrl","comment":" Create base64-url that can be used directly as img source (`img [ src <| toPngUrl myImage ]`)\n","type":"Image.Image -> String.String"}],"binops":[]},{"name":"Image.Advanced","comment":"\n\n@docs map, info, eval\n@docs toPng32\n@docs toBmp24, toBmp32\n\n","unions":[],"aliases":[],"values":[{"name":"eval","comment":" When decoding images they are decoded in \"lazy way\" (real decoding is postponed until data is needed)\nthis function do decode, useful if you need to encode multiple images from same source\n","type":"Image.Internal.ImageData.Image -> Image.Internal.ImageData.Image"},{"name":"info","comment":" Get image info\n","type":"Image.Internal.ImageData.Image -> Image.Info.Info"},{"name":"map","comment":" Apply a function on every pixel in an image.\n","type":"(Basics.Int -> Basics.Int) -> Image.Internal.ImageData.Image -> Image.Internal.ImageData.Image"},{"name":"toBmp24","comment":" Encode image into BMP24\n","type":"Image.Internal.ImageData.Image -> Bytes.Bytes"},{"name":"toBmp32","comment":" Encode image into BMP32\n\n**Note**: Using BMP 32bit is discouraged due to lack of proper support across browsers\n\n","type":"Image.Internal.ImageData.Image -> Bytes.Bytes"},{"name":"toPng32","comment":" Encode image into True color with alpha PNG image\n","type":"Image.Internal.ImageData.Image -> Bytes.Bytes"}],"binops":[]},{"name":"Image.Color","comment":" Same as main functions only instead of `Int` uses `Color` (`avh4/elm-color`) to represent pixel\n\n\n# Construct\n\n@docs fromList, fromList2d, fromArray, fromArray2d\n\n\n# Destruct\n\n@docs toList, toList2d, toArray, toArray2d\n\n","unions":[],"aliases":[],"values":[{"name":"fromArray","comment":" Create [`Image`](#Image) of `Array Int` where each `Color` is pixel\n","type":"Image.Width -> Array.Array Color.Color -> Image.Internal.ImageData.Image"},{"name":"fromArray2d","comment":" Create [`Image`](#Image) of `Array (Array Int)` where each `Color` is pixel\n","type":"Array.Array (Array.Array Color.Color) -> Image.Internal.ImageData.Image"},{"name":"fromList","comment":" Create [`Image`](Image#Image) of `List Color` where each `Color` is pixel\n","type":"Image.Width -> List.List Color.Color -> Image.Internal.ImageData.Image"},{"name":"fromList2d","comment":" Create [`Image`](#Image) of `List (List Int)` where each `Color` is pixel\n","type":"List.List (List.List Color.Color) -> Image.Internal.ImageData.Image"},{"name":"toArray","comment":" Take [`Image`](#Image) of and converts it to `Array Int` where each `Color` is pixel\n","type":"Image.Internal.ImageData.Image -> Array.Array Color.Color"},{"name":"toArray2d","comment":" Take [`Image`](#Image) of and converts it to matrix `Array (Array Int)` where each `Color` is pixel\n","type":"Image.Internal.ImageData.Image -> Array.Array (Array.Array Color.Color)"},{"name":"toList","comment":" Take [`Image`](#Image) of and converts it to `List Int` where each `Color` is pixel\n","type":"Image.Internal.ImageData.Image -> List.List Color.Color"},{"name":"toList2d","comment":" Take [`Image`](#Image) of and converts it to matrix `List (List Int)` where each `Color` is pixel\n","type":"Image.Internal.ImageData.Image -> List.List (List.List Color.Color)"}],"binops":[]},{"name":"Image.Info","comment":"\n\n@docs Info\n@docs PngColor, PngInfo, BmpInfo, FromDataInfo\n\n\n# Helper functions\n\n@docs dimensions\n\n\n# Helper types\n\n@docs BitDepth1_2_4_8, BitDepth1_2_4_8_16, BitDepth8_16, BmpBitsPerPixel, FromDataBitDepth, FromDataColor\n\n","unions":[{"name":"BitDepth1_2_4_8","comment":" ","args":[],"cases":[["BitDepth1_2_4_8__1",[]],["BitDepth1_2_4_8__2",[]],["BitDepth1_2_4_8__4",[]],["BitDepth1_2_4_8__8",[]]]},{"name":"BitDepth1_2_4_8_16","comment":" ","args":[],"cases":[["BitDepth1_2_4_8_16__1",[]],["BitDepth1_2_4_8_16__2",[]],["BitDepth1_2_4_8_16__4",[]],["BitDepth1_2_4_8_16__8",[]],["BitDepth1_2_4_8_16__16",[]]]},{"name":"BitDepth8_16","comment":" ","args":[],"cases":[["BitDepth8_16__8",[]],["BitDepth8_16__16",[]]]},{"name":"BmpBitsPerPixel","comment":" ","args":[],"cases":[["BmpBitsPerPixel8",[]],["BmpBitsPerPixel16",[]],["BmpBitsPerPixel24",[]],["BmpBitsPerPixel32",[]]]},{"name":"FromDataBitDepth","comment":" ","args":[],"cases":[["FromDataBitDepth1",[]],["FromDataBitDepth2",[]],["FromDataBitDepth4",[]],["FromDataBitDepth8",[]],["FromDataBitDepth16",[]]]},{"name":"FromDataColor","comment":" ","args":[],"cases":[["FromDataChannel1",["Image.Info.FromDataBitDepth"]],["FromDataChannel2",["Image.Info.FromDataBitDepth"]],["FromDataChannel3",["Image.Info.FromDataBitDepth"]],["FromDataChannel4",["Image.Info.FromDataBitDepth"]]]},{"name":"Info","comment":" ","args":[],"cases":[["Png",["Image.Info.PngInfo"]],["Bmp",["Image.Info.BmpInfo"]],["Gif",["Image.Info.GifInfo"]],["FromData",["Image.Info.FromDataInfo"]]]},{"name":"PngColor","comment":" ","args":[],"cases":[["Greyscale",["Image.Info.BitDepth1_2_4_8_16"]],["GreyscaleAlpha",["Image.Info.BitDepth8_16"]],["TrueColour",["Image.Info.BitDepth8_16"]],["TrueColourAlpha",["Image.Info.BitDepth8_16"]],["IndexedColour",["Image.Info.BitDepth1_2_4_8"]]]}],"aliases":[{"name":"BmpInfo","comment":" ","args":[],"type":"{ width : Basics.Int, height : Basics.Int, fileSize : Basics.Int, pixelStart : Basics.Int, dibHeader : Basics.Int, color_planes : Basics.Int, bitsPerPixel : Image.Info.BmpBitsPerPixel, compression : Basics.Int, dataSize : Basics.Int }"},{"name":"FromDataInfo","comment":" ","args":[],"type":"{ width : Basics.Int, height : Basics.Int, color : Image.Info.FromDataColor }"},{"name":"PngInfo","comment":" ","args":[],"type":"{ width : Basics.Int, height : Basics.Int, color : Image.Info.PngColor, adam7 : Basics.Bool }"}],"values":[{"name":"dimensions","comment":" ","type":"Image.Info.Info -> { width : Basics.Int, height : Basics.Int }"}],"binops":[]},{"name":"Image.Magic","comment":"\n\n@docs mirror\n\n","unions":[],"aliases":[],"values":[{"name":"mirror","comment":" ","type":"Basics.Bool -> Basics.Bool -> Image.Internal.ImageData.Image -> Image.Internal.ImageData.Image"}],"binops":[]}]