pub struct Image { /* private fields */ }
Expand description
a pdf can be opened from a file or from Vec
Implementations
sourceimpl Image
impl Image
pub fn new(source: DataSource) -> Self
sourceimpl Image
impl Image
pub fn open<S: Into<PathBuf>>(path: S) -> Result<Self>
pub fn read(data: &[u8], format: Format) -> Result<Self>
pub fn save(self, path: &str) -> Result<()>
pub fn save_every_image(self, path_template: &str) -> Result<()>
pub fn to_image(self) -> Result<DynamicImage>
pub fn apply(self) -> Result<Image>
pub fn set_width(self, width: usize) -> Self
pub fn set_height(self, height: usize) -> Self
pub fn max_width(self, max_width: usize) -> Self
pub fn max_height(self, max_height: usize) -> Self
pub fn scale(self, scale: f32) -> Self
Auto Trait Implementations
impl RefUnwindSafe for Image
impl Send for Image
impl Sync for Image
impl Unpin for Image
impl UnwindSafe for Image
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more