Struct lodepng::ffi::Info [] [src]

#[repr(C)]
pub struct Info { pub compression_method: c_uint, pub filter_method: c_uint, pub interlace_method: c_uint, pub color: ColorMode, pub background_defined: c_uint, pub background_r: c_uint, pub background_g: c_uint, pub background_b: c_uint, pub time_defined: c_uint, pub time: Time, pub phys_defined: c_uint, pub phys_x: c_uint, pub phys_y: c_uint, pub phys_unit: c_uint, pub unknown_chunks_data: [*mut c_uchar; 3], pub unknown_chunks_size: [usize; 3], // some fields omitted }

Information about the PNG image, except pixels, width and height

Fields

compression method of the original file. Always 0.

filter method of the original file

interlace method of the original file

color type and bits, palette and transparency of the PNG file

suggested background color chunk (bKGD) This color uses the same color mode as the PNG (except alpha channel), which can be 1-bit to 16-bit.

For greyscale PNGs, r, g and b will all 3 be set to the same. When encoding the encoder writes the red one. For palette PNGs: When decoding, the RGB value will be stored, not a palette index. But when encoding, specify the index of the palette in background_r, the other two are then ignored.

The decoder does not use this background color to edit the color of pixels.

red component of suggested background color

green component of suggested background color

blue component of suggested background color

set to 1 to make the encoder generate a tIME chunk

time chunk (tIME)

if 0, there is no pHYs chunk and the values below are undefined, if 1 else there is one

pixels per unit in x direction

pixels per unit in y direction

may be 0 (unknown unit) or 1 (metre)

unknown chunks There are 3 buffers, one for each position in the PNG where unknown chunks can appear each buffer contains all unknown chunks for that position consecutively The 3 buffers are the unknown chunks between certain critical chunks: 0: IHDR-PLTE, 1: PLTE-IDAT, 2: IDAT-IEND Do not allocate or traverse this data yourself. Use the chunk traversing functions declared later, such as lodepng_chunk_next and lodepng_chunk_append, to read/write this struct.

Methods

impl Info
[src]

use this to clear the texts again after you filled them in

push back both texts at once

use this to clear the itexts again after you filled them in

push back the 4 texts of 1 chunk at once