var searchIndex = {}; searchIndex["oxipng"] = {"doc":"","items":[[3,"Options","oxipng","Options controlling the output of the `optimize` function",null,null],[12,"backup","","Whether the input file should be backed up before writing the output",0,null],[12,"out_file","","Path to write the output file to",0,null],[12,"out_dir","","Used only in CLI interface",0,null],[12,"stdout","","Write to stdout instead of a file",0,null],[12,"fix_errors","","Attempt to fix errors when decoding the input file",0,null],[12,"pretend","","Don't actually write any output, just calculate the best results",0,null],[12,"recursive","","Used only in CLI interface",0,null],[12,"clobber","","Overwrite existing output files",0,null],[12,"create","","Create new output files if they don't exist",0,null],[12,"force","","Write to output even if there was no improvement in compression",0,null],[12,"preserve_attrs","","Ensure the output file has the same permissions as the input file",0,null],[12,"verbosity","","How verbose the console logging should be (`None` for quiet, `Some(0)` for normal, `Some(1)` for verbose)",0,null],[12,"filter","","Which filters to try on the file (0-5)",0,null],[12,"interlace","","Whether to change the interlacing type of the file\n`None` will not change the current interlacing type\n`Some(x)` will change the file to interlacing mode `x`",0,null],[12,"compression","","Which zlib compression levels to try on the file (1-9)",0,null],[12,"memory","","Which zlib memory levels to try on the file (1-9)",0,null],[12,"strategies","","Which zlib compression strategies to try on the file (0-3)",0,null],[12,"window","","Window size to use when compressing the file, as `2^window` bytes\nDoesn't affect compression but may affect speed and memory usage\n15 is recommended default, 8-15 are valid values",0,null],[12,"bit_depth_reduction","","Whether to attempt bit depth reduction",0,null],[12,"color_type_reduction","","Whether to attempt color type reduction",0,null],[12,"palette_reduction","","Whether to attempt palette reduction",0,null],[12,"idat_recoding","","Whether to perform IDAT recoding\nIf any type of reduction is performed, IDAT recoding will be performed\nregardless of this setting",0,null],[12,"strip","","Which headers to strip from the PNG file, if any",0,null],[12,"use_heuristics","","Whether to use heuristics to pick the best filter and compression\nIntended for use with `-o 1` from the CLI interface",0,null],[5,"optimize","","Perform optimization on the input file using the options provided",null,{"inputs":[{"name":"path"},{"name":"options"}],"output":{"name":"result"}}],[0,"deflate","","",null,null],[0,"deflate","oxipng::deflate","",null,null],[5,"inflate","oxipng::deflate::deflate","Decompress a data stream using the DEFLATE algorithm",null,null],[5,"deflate","","Compress a data stream using the zlib implementation of the DEFLATE algorithm",null,null],[0,"stream","oxipng::deflate","",null,null],[3,"Stream","oxipng::deflate::stream","",null,null],[4,"Compress","","",null,null],[4,"Decompress","","",null,null],[11,"new_compress","","",1,{"inputs":[{"name":"c_int"},{"name":"c_int"},{"name":"c_int"},{"name":"c_int"}],"output":{"name":"stream"}}],[11,"new_decompress","","",1,{"inputs":[],"output":{"name":"stream"}}],[11,"total_in","","",1,null],[11,"total_out","","",1,null],[11,"decompress_vec","","",1,null],[11,"compress_vec","","",1,null],[11,"reset","","",1,null],[11,"drop","","",1,null],[0,"png","oxipng","",null,null],[3,"ScanLines","oxipng::png","An iterator over the scan lines of a PNG image",null,null],[12,"png","","A reference to the PNG image being iterated upon",2,null],[3,"ScanLine","","A scan line in a PNG image",null,null],[12,"filter","","The filter type used to encode the current scan line (0-4)",3,null],[12,"data","","The byte data for the current scan line, encoded with the filter specified in the `filter` field",3,null],[12,"pass","","The current pass if the image is interlaced",3,null],[3,"PngData","","Contains all data relevant to a PNG image",null,null],[12,"idat_data","","The filtered and compressed data of the IDAT chunk",4,null],[12,"ihdr_data","","The headers stored in the IHDR chunk",4,null],[12,"raw_data","","The uncompressed, optionally filtered data from the IDAT chunk",4,null],[12,"palette","","The palette containing colors used in an Indexed image\nContains 3 bytes per color (R+G+B), up to 768",4,null],[12,"transparency_pixel","","The pixel value that should be rendered as transparent",4,null],[12,"transparency_palette","","A map of how transparent each color in the palette should be",4,null],[12,"aux_headers","","All non-critical headers from the PNG are stored here",4,null],[3,"IhdrData","","Headers from the IHDR chunk of the image",null,null],[12,"width","","The width of the image in pixels",5,null],[12,"height","","The height of the image in pixels",5,null],[12,"color_type","","The color type of the image",5,null],[12,"bit_depth","","The bit depth of the image",5,null],[12,"compression","","The compression method used for this image (0 for DEFLATE)",5,null],[12,"filter","","The filter mode used for this image (currently only 0 is valid)",5,null],[12,"interlaced","","The interlacing mode of the image (0 = None, 1 = Adam7)",5,null],[4,"ColorType","","The color type used to represent this image",null,null],[13,"Grayscale","","Grayscale, with one color channel",6,null],[13,"RGB","","RGB, with three color channels",6,null],[13,"Indexed","","Indexed, with one byte per pixel representing one of up to 256 colors in the image",6,null],[13,"GrayscaleAlpha","","Grayscale + Alpha, with two color channels",6,null],[13,"RGBA","","RGBA, with four color channels",6,null],[4,"BitDepth","","The number of bits to be used per channel per pixel",null,null],[13,"One","","One bit per channel per pixel",7,null],[13,"Two","","Two bits per channel per pixel",7,null],[13,"Four","","Four bits per channel per pixel",7,null],[13,"Eight","","Eight bits per channel per pixel",7,null],[13,"Sixteen","","Sixteen bits per channel per pixel",7,null],[4,"Headers","","Options to use for performing operations on headers (such as stripping)",null,null],[13,"None","","None",8,null],[13,"Some","","Some, with a list of 4-character chunk codes",8,null],[13,"Safe","","Headers that won't affect rendering (all but cHRM, gAMA, iCCP, sBIT, sRGB, bKGD, hIST, pHYs, sPLT)",8,null],[13,"All","","All non-critical headers",8,null],[11,"clone","","",6,null],[11,"eq","","",6,null],[11,"fmt","","",6,null],[11,"fmt","","",6,null],[11,"clone","","",7,null],[11,"eq","","",7,null],[11,"fmt","","",7,null],[11,"fmt","","",7,null],[11,"as_u8","","Retrieve the number of bits per channel per pixel as a `u8`",7,null],[11,"from_u8","","Parse a number of bits per channel per pixel into a `BitDepth`",7,{"inputs":[{"name":"u8"}],"output":{"name":"bitdepth"}}],[11,"clone","","",8,null],[11,"eq","","",8,null],[11,"ne","","",8,null],[11,"fmt","","",8,null],[11,"clone","","",2,null],[11,"fmt","","",2,null],[11,"next","","",2,null],[11,"clone","","",3,null],[11,"fmt","","",3,null],[11,"clone","","",4,null],[11,"fmt","","",4,null],[11,"clone","","",5,null],[11,"fmt","","",5,null],[11,"new","","Create a new `PngData` struct by opening a file",4,{"inputs":[{"name":"path"}],"output":{"name":"result"}}],[11,"channels_per_pixel","","Return the number of channels in the image, based on color type",4,null],[11,"output","","Format the `PngData` struct into a valid PNG bytestream",4,null],[11,"scan_lines","","Return an iterator over the scanlines of the image",4,null],[11,"unfilter_image","","Reverse all filters applied on the image, returning an unfiltered IDAT bytestream",4,null],[11,"filter_image","","Apply the specified filter type to all rows in the image\n0: None\n1: Sub\n2: Up\n3: Average\n4: Paeth\n5: All (heuristically pick the best filter for each line)",4,null],[11,"reduce_bit_depth","","Attempt to reduce the bit depth of the image\nReturns true if the bit depth was reduced, false otherwise",4,null],[11,"reduce_palette","","Attempt to reduce the number of colors in the palette\nReturns true if the palette was reduced, false otherwise",4,null],[11,"reduce_color_type","","Attempt to reduce the color type of the image\nReturns true if the color type was reduced, false otherwise",4,null],[11,"change_interlacing","","Convert the image to the specified interlacing type\nReturns true if the interlacing was changed, false otherwise\nThe `interlace` parameter specifies the *new* interlacing mode\nAssumes that the data has already been de-filtered",4,null],[11,"fmt","oxipng","",0,null],[11,"clone","","",0,null]],"paths":[[3,"Options"],[3,"Stream"],[3,"ScanLines"],[3,"ScanLine"],[3,"PngData"],[3,"IhdrData"],[4,"ColorType"],[4,"BitDepth"],[4,"Headers"]]}; initSearch(searchIndex);