[−][src]Struct rips::Image
Methods
impl Image
[src]
pub fn width(&self) -> i32
[src]
pub fn height(&self) -> i32
[src]
pub fn from_file<S: Into<Vec<u8>>>(path: S) -> Result<Image>
[src]
pub fn from_memory(
buf: Vec<u8>,
width: i32,
height: i32,
bands: i32,
format: VipsBandFormat
) -> Result<Image>
[src]
buf: Vec<u8>,
width: i32,
height: i32,
bands: i32,
format: VipsBandFormat
) -> Result<Image>
pub fn resize(
&self,
scale: f64,
vscale: Option<f64>,
kernel: Option<VipsKernel>
) -> Result<Image>
[src]
&self,
scale: f64,
vscale: Option<f64>,
kernel: Option<VipsKernel>
) -> Result<Image>
pub fn resize_to(
&self,
width: Option<i32>,
height: Option<i32>
) -> Result<Image>
[src]
&self,
width: Option<i32>,
height: Option<i32>
) -> Result<Image>
pub fn crop(
&self,
left: i32,
top: i32,
width: i32,
height: i32
) -> Result<Image>
[src]
&self,
left: i32,
top: i32,
width: i32,
height: i32
) -> Result<Image>
pub fn rotate(&self, angle: VipsAngle) -> Result<Image>
[src]
pub fn write_to_file<S: Into<Vec<u8>>>(&self, path: S) -> Result<()>
[src]
pub fn to_buffer(&self, suffix: &str) -> Result<Vec<u8>>
[src]
pub fn to_bytes(&self) -> Vec<u8>
[src]
Trait Implementations
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for 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.
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,