[−][src]Struct lodepng::ffi::Info
Information about the PNG image, except pixels, width and height
Fields
interlace_method: u8
interlace method of the original file
color: ColorMode
color type and bits, palette and transparency of the PNG file
background_defined: bool
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.
background_r: u16
red component of suggested background color
background_g: u16
green component of suggested background color
background_b: u16
blue component of suggested background color
time_defined: bool
set to 1 to make the encoder generate a tIME chunk
time: Time
time chunk (tIME)
phys_defined: bool
if 0, there is no pHYs chunk and the values below are undefined, if 1 else there is one
phys_x: c_uint
pixels per unit in x direction
phys_y: c_uint
pixels per unit in y direction
phys_unit: u8
may be 0 (unknown unit) or 1 (metre)
Implementations
impl Info
[src]
pub fn new() -> Self
[src]
pub fn text_keys(&self) -> TextKeysIter<'_>
[src]
pub fn text_keys_cstr(&self) -> TextKeysIter<'_>
[src]
use text_keys
pub fn itext_keys(&self) -> ITextKeysIter<'_>
[src]
pub fn clear_text(&mut self)
[src]
use this to clear the texts again after you filled them in
pub fn add_text(&mut self, key: &str, str: &str) -> Result<(), Error>
[src]
push back both texts at once
pub fn clear_itext(&mut self)
[src]
use this to clear the itexts again after you filled them in
pub fn add_itext(
&mut self,
key: &str,
langtag: &str,
transkey: &str,
text: &str
) -> Result<(), Error>
[src]
&mut self,
key: &str,
langtag: &str,
transkey: &str,
text: &str
) -> Result<(), Error>
push back the 4 texts of 1 chunk at once
pub fn append_chunk(
&mut self,
position: ChunkPosition,
chunk: ChunkRef<'_>
) -> Result<(), Error>
[src]
&mut self,
position: ChunkPosition,
chunk: ChunkRef<'_>
) -> Result<(), Error>
pub fn create_chunk<C: AsRef<[u8]>>(
&mut self,
position: ChunkPosition,
chtype: C,
data: &[u8]
) -> Result<(), Error>
[src]
&mut self,
position: ChunkPosition,
chtype: C,
data: &[u8]
) -> Result<(), Error>
pub fn get<Name: AsRef<[u8]>>(&self, index: Name) -> Option<ChunkRef<'_>>
[src]
pub fn unknown_chunks(&self, position: ChunkPosition) -> ChunksIter<'_>
[src]
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Info
[src]
impl Send for Info
[src]
impl Sync for Info
[src]
impl Unpin for Info
[src]
impl UnwindSafe for Info
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,