var searchIndex = {}; searchIndex["png"] = {"doc":"# PNG encoder and decoder\nThis crate contains a PNG decoder. It supports reading of single lines or whole frames.\n## The decoder\nThe most important types for decoding purposes are [`Decoder`](struct.Decoder.html) and\n[`Reader`](struct.Reader.html). They both wrap a `std::io::Read`.\n`Decoder` serves as a builder for `Reader`. Calling `Decoder::read_info` reads from the `Read` until the\nimage data is reached.\n### Using the decoder\n use std::fs::File;","items":[[3,"FrameControl","png","Frame control information",null,null],[12,"sequence_number","","Sequence number of the animation chunk, starting from 0",0,null],[12,"width","","Width of the following frame",0,null],[12,"height","","Height of the following frame",0,null],[12,"x_offset","","X position at which to render the following frame",0,null],[12,"y_offset","","Y position at which to render the following frame",0,null],[12,"delay_num","","Frame delay fraction numerator",0,null],[12,"delay_den","","Frame delay fraction denominator",0,null],[12,"dispose_op","","Type of frame area disposal to be done after rendering this frame",0,null],[12,"blend_op","","Type of frame area rendering for this frame",0,null],[3,"AnimationControl","","Animation control information",null,null],[12,"num_frames","","Number of frames",1,null],[12,"num_plays","","Number of times to loop this APNG. 0 indicates infinite looping.",1,null],[3,"Info","","PNG info struct",null,null],[12,"width","","",2,null],[12,"height","","",2,null],[12,"bit_depth","","",2,null],[12,"color_type","","",2,null],[12,"interlaced","","",2,null],[12,"trns","","",2,null],[12,"palette","","",2,null],[12,"frame_control","","",2,null],[12,"animation_control","","",2,null],[3,"Transformations","","# Output transformations",null,null],[3,"Decoder","","PNG Decoder",null,null],[3,"Reader","","PNG reader (mostly high-level interface)",null,null],[3,"OutputInfo","","Output info",null,null],[12,"width","","",3,null],[12,"height","","",3,null],[12,"color_type","","",3,null],[12,"bit_depth","","",3,null],[12,"line_size","","",3,null],[3,"StreamingDecoder","","PNG StreamingDecoder (low-level interface)",null,null],[3,"Encoder","","",null,null],[3,"Writer","","",null,null],[4,"ColorType","","",null,null],[13,"Grayscale","","",4,null],[13,"RGB","","",4,null],[13,"Indexed","","",4,null],[13,"GrayscaleAlpha","","",4,null],[13,"RGBA","","",4,null],[4,"BitDepth","","Bit depth of the png file",null,null],[13,"One","","",5,null],[13,"Two","","",5,null],[13,"Four","","",5,null],[13,"Eight","","",5,null],[13,"Sixteen","","",5,null],[4,"Decoded","","Result of the decoding process",null,null],[13,"Nothing","","Nothing decoded yet",6,null],[13,"Header","","",6,null],[13,"ChunkBegin","","",6,null],[13,"ChunkComplete","","",6,null],[13,"AnimationControl","","",6,null],[13,"FrameControl","","",6,null],[13,"ImageData","","Decoded raw image data.",6,null],[13,"PartialChunk","","",6,null],[13,"ImageEnd","","",6,null],[4,"DecodingError","","",null,null],[13,"IoError","","",7,null],[13,"Format","","",7,null],[13,"InvalidSignature","","",7,null],[13,"CrcMismatch","","",7,null],[12,"recover","png::DecodingError","bytes to skip to try to recover from this error",7,null],[12,"crc_val","","Stored CRC32 value",7,null],[12,"crc_sum","","Calculated CRC32 sum",7,null],[12,"chunk","","",7,null],[13,"Other","png","",7,null],[13,"CorruptFlateStream","","",7,null],[4,"EncodingError","","",null,null],[13,"IoError","","",8,null],[13,"Format","","",8,null],[0,"chunk","","Chunk types and functions",null,null],[5,"is_critical","png::chunk","Returns true if the chunk is critical.",null,{"inputs":[{"name":"chunktype"}],"output":{"name":"bool"}}],[5,"is_private","","Returns true if the chunk is private.",null,{"inputs":[{"name":"chunktype"}],"output":{"name":"bool"}}],[5,"reserved_set","","Checks whether the reserved bit of the chunk name is set.\nIf it is set the chunk name is invalid.",null,{"inputs":[{"name":"chunktype"}],"output":{"name":"bool"}}],[5,"save_to_copy","","Returns true if the chunk is safe to copy if unknown.",null,{"inputs":[{"name":"chunktype"}],"output":{"name":"bool"}}],[6,"ChunkType","","",null,null],[17,"IHDR","","Image header",null,null],[17,"PLTE","","Palette",null,null],[17,"IDAT","","Image data",null,null],[17,"IEND","","Image trailer",null,null],[17,"tRNS","","Transparency",null,null],[17,"bKGD","","Background colour",null,null],[17,"tIME","","Image last-modification time",null,null],[17,"acTL","","Animation control",null,null],[17,"fcTL","","Frame control",null,null],[17,"fdAT","","Frame data",null,null],[11,"fmt","png","",6,null],[11,"fmt","","",7,null],[11,"description","","",7,null],[11,"fmt","","",7,null],[11,"from","","",7,{"inputs":[{"name":"error"}],"output":{"name":"decodingerror"}}],[11,"from","","",7,{"inputs":[{"name":"string"}],"output":{"name":"decodingerror"}}],[11,"new","","Creates a new StreamingDecoder",9,{"inputs":[],"output":{"name":"streamingdecoder"}}],[11,"reset","","Resets the StreamingDecoder",9,null],[11,"update","","Low level StreamingDecoder interface.",9,null],[11,"set_param","","",10,null],[11,"buffer_size","","Returns the size needed to hold a decoded frame",3,null],[11,"new","","",11,{"inputs":[{"name":"r"}],"output":{"name":"decoder"}}],[11,"read_info","","Reads all meta data until the first IDAT chunk",11,null],[11,"info","","",12,null],[11,"next_frame","","Decodes the next frame into `buf`",12,null],[11,"next_row","","Returns the next processed row of the image",12,null],[11,"next_interlaced_row","","Returns the next processed row of the image",12,null],[11,"output_color_type","","Returns the color type and the number of bits per sample\nof the data returned by `Reader::next_row` and Reader::frames`.",12,null],[11,"output_buffer_size","","Returns the number of bytes required to hold a deinterlaced image frame\nthat is decoded using the given input transformations.",12,null],[11,"output_line_size","","Returns the number of bytes required to hold a deinterlaced row.",12,null],[11,"fmt","","",8,null],[11,"description","","",8,null],[11,"fmt","","",8,null],[11,"from","","",8,{"inputs":[{"name":"error"}],"output":{"name":"encodingerror"}}],[11,"new","","",13,{"inputs":[{"name":"w"},{"name":"u32"},{"name":"u32"}],"output":{"name":"encoder"}}],[11,"write_header","","",13,null],[11,"set_param","","",4,null],[11,"set_param","","",5,null],[11,"write_chunk","","",14,null],[11,"write_image_data","","Writes the image data.",14,null],[11,"drop","","",14,null],[11,"eq","","",4,null],[11,"clone","","",4,null],[11,"fmt","","",4,null],[11,"samples","","Returns the number of samples used per pixel of `ColorType`",4,null],[11,"from_u8","","u8 -> Self. Temporary solution until Rust provides a canonical one.",4,{"inputs":[{"name":"u8"}],"output":{"name":"option"}}],[11,"eq","","",5,null],[11,"clone","","",5,null],[11,"fmt","","",5,null],[11,"from_u8","","u8 -> Self. Temporary solution until Rust provides a canonical one.",5,{"inputs":[{"name":"u8"}],"output":{"name":"option"}}],[11,"fmt","","",0,null],[11,"fmt","","",1,null],[11,"clone","","",1,null],[11,"fmt","","",2,null],[11,"default","","",2,{"inputs":[],"output":{"name":"info"}}],[11,"size","","Size of the image",2,null],[11,"is_animated","","Returns true if the image is an APNG image.",2,null],[11,"animation_control","","Returns the frame control information of the image",2,null],[11,"frame_control","","Returns the frame control information of the current frame",2,null],[11,"bits_per_pixel","","Returns the bits per pixel",2,null],[11,"bytes_per_pixel","","Returns the bytes per pixel",2,null],[11,"raw_bytes","","Returns the number of bytes needed for one deinterlaced image",2,null],[11,"raw_row_length","","Returns the number of bytes needed for one deinterlaced row",2,null],[11,"raw_row_length_from_width","","Returns the number of bytes needed for one deinterlaced row of width `width`",2,null],[11,"hash","","",10,null],[11,"cmp","","",10,null],[11,"partial_cmp","","",10,null],[11,"lt","","",10,null],[11,"le","","",10,null],[11,"gt","","",10,null],[11,"ge","","",10,null],[11,"clone","","",10,null],[11,"eq","","",10,null],[11,"ne","","",10,null],[11,"fmt","","",10,null],[11,"empty","","Returns an empty set of flags.",10,{"inputs":[],"output":{"name":"transformations"}}],[11,"all","","Returns the set containing all flags.",10,{"inputs":[],"output":{"name":"transformations"}}],[11,"bits","","Returns the raw value of the flags currently stored.",10,null],[11,"from_bits","","Convert from underlying bit representation, unless that\nrepresentation contains bits that do not correspond to a flag.",10,{"inputs":[{"name":"u32"}],"output":{"name":"option"}}],[11,"from_bits_truncate","","Convert from underlying bit representation, dropping any bits\nthat do not correspond to flags.",10,{"inputs":[{"name":"u32"}],"output":{"name":"transformations"}}],[11,"is_empty","","Returns `true` if no flags are currently stored.",10,null],[11,"is_all","","Returns `true` if all flags are currently set.",10,null],[11,"intersects","","Returns `true` if there are flags common to both `self` and `other`.",10,null],[11,"contains","","Returns `true` all of the flags in `other` are contained within `self`.",10,null],[11,"insert","","Inserts the specified flags in-place.",10,null],[11,"remove","","Removes the specified flags in-place.",10,null],[11,"toggle","","Toggles the specified flags in-place.",10,null],[11,"bitor","","Returns the union of the two sets of flags.",10,null],[11,"bitxor","","Returns the left flags, but with all the right flags toggled.",10,null],[11,"bitand","","Returns the intersection between the two sets of flags.",10,null],[11,"sub","","Returns the set difference of the two sets of flags.",10,null],[11,"not","","Returns the complement of this set of flags.",10,null],[11,"from_iter","","",10,{"inputs":[{"name":"t"}],"output":{"name":"transformations"}}],[17,"TRANSFORM_IDENTITY","","No transformation",null,null],[17,"TRANSFORM_STRIP_16","","Strip 16-bit samples to 8 bits",null,null],[17,"TRANSFORM_STRIP_ALPHA","","Discard the alpha channel",null,null],[17,"TRANSFORM_PACKING","","Expand 1, 2 and 4-bit samples to bytes",null,null],[17,"TRANSFORM_PACKSWAP","","Change order of packed pixels to LSB first",null,null],[17,"TRANSFORM_EXPAND","","Expand paletted images to RGB, expand grayscale images of\nless than 8-bit depth to 8-bit depth, and expand tRNS chunks\nto alpha channels.",null,null],[17,"TRANSFORM_INVERT_MONO","","Invert monochrome images",null,null],[17,"TRANSFORM_SHIFT","","Normalize pixels to the sBIT depth",null,null],[17,"TRANSFORM_BGR","","Flip RGB to BGR, RGBA to BGRA",null,null],[17,"TRANSFORM_SWAP_ALPHA","","Flip RGBA to ARGB or GA to AG",null,null],[17,"TRANSFORM_SWAP_ENDIAN","","Byte-swap 16-bit samples",null,null],[17,"TRANSFORM_INVERT_ALPHA","","Change alpha from opacity to transparency",null,null],[17,"TRANSFORM_STRIP_FILLER","","",null,null],[17,"TRANSFORM_STRIP_FILLER_BEFORE","","",null,null],[17,"TRANSFORM_STRIP_FILLER_AFTER","","",null,null],[17,"TRANSFORM_GRAY_TO_RGB","","",null,null],[17,"TRANSFORM_EXPAND_16","","",null,null],[17,"TRANSFORM_SCALE_16","","",null,null],[8,"Parameter","","Configuration parameter trait",null,null],[10,"set_param","","",15,null],[8,"HasParameters","","Object has parameters",null,null],[11,"set","","",16,null],[11,"set","","",16,null]],"paths":[[3,"FrameControl"],[3,"AnimationControl"],[3,"Info"],[3,"OutputInfo"],[4,"ColorType"],[4,"BitDepth"],[4,"Decoded"],[4,"DecodingError"],[4,"EncodingError"],[3,"StreamingDecoder"],[3,"Transformations"],[3,"Decoder"],[3,"Reader"],[3,"Encoder"],[3,"Writer"],[8,"Parameter"],[8,"HasParameters"]]}; initSearch(searchIndex);