Struct jpng::Jpng [−][src]
pub struct Jpng { pub footer: JpngFooter, // some fields omitted }
Fields
Methods
impl Jpng
[src]
impl Jpng
pub fn new<P: AsRef<Path>>(path: P) -> Result<Jpng, Error>
[src]
pub fn new<P: AsRef<Path>>(path: P) -> Result<Jpng, Error>
pub fn save(&self, basename: &str) -> Result<(), Error>
[src]
pub fn save(&self, basename: &str) -> Result<(), Error>
Saves the JPNG image as a PNG with the combined image and mask.
The name passed to this method must be the basename without an extension. This is because .png is automatically appended to it in order to ensure it encodes the right format.
pub fn save_image(&self, basename: &str) -> Result<(), Error>
[src]
pub fn save_image(&self, basename: &str) -> Result<(), Error>
Saves the JPEG image inside the JPNG.
The basename given will have .jpg appended to the end, and it will overwrite the destination if it already exists.
pub fn save_mask(&self, basename: &str) -> Result<(), Error>
[src]
pub fn save_mask(&self, basename: &str) -> Result<(), Error>
Saves the PNG alpha mask inside the JPNG.
The basename given will have .png appended to the end, and it will overwrite the destination if it already exists.