Struct VipsImage

Source
pub struct VipsImage { /* private fields */ }

Implementations§

Source§

impl VipsImage

This is the main type of vips. It represents an image and most operations will take one as input and output a new one. In the moment this type is not thread safe. Be careful working within thread environments.

Source

pub fn new() -> VipsImage

Source

pub fn new_memory() -> Result<VipsImage>

Source

pub fn new_from_file(filename: &str) -> Result<VipsImage>

Source

pub fn new_from_file_rw(filename: &str) -> Result<VipsImage>

Source

pub fn new_from_file_raw( filename: &str, x_size: i32, y_size: i32, bands: i32, offset: u64, ) -> Result<VipsImage>

Source

pub fn new_from_file_access( filename: &str, access: Access, memory: bool, ) -> Result<VipsImage>

Source

pub fn new_from_buffer(buffer: &[u8], option_str: &str) -> Result<VipsImage>

Source

pub fn new_from_memory( buffer: &[u8], width: i32, height: i32, bands: i32, format: BandFormat, ) -> Result<VipsImage>

Source

pub fn image_new_matrix(width: i32, height: i32) -> Result<VipsImage>

Source

pub fn image_new_matrix_from_array( width: i32, height: i32, array: &[f64], ) -> Result<VipsImage>

Source

pub fn new_from_image(image: &VipsImage, array: &[f64]) -> Result<VipsImage>

Source

pub fn new_from_image1(image: &VipsImage, c: f64) -> Result<VipsImage>

Source

pub fn image_new_temp_file(format: &str) -> Result<VipsImage>

Source

pub fn image_copy_memory(image: VipsImage) -> Result<VipsImage>

Source

pub fn image_wio_input(&mut self) -> Result<()>

Source

pub fn get_filename(&self) -> Result<&str, Utf8Error>

Source

pub fn get_width(&self) -> i32

Source

pub fn get_height(&self) -> i32

Source

pub fn get_xoffset(&self) -> i32

Source

pub fn get_yoffset(&self) -> i32

Source

pub fn get_scale(&self) -> f64

Source

pub fn get_offset(&self) -> f64

Source

pub fn get_xres(&self) -> f64

Source

pub fn get_yres(&self) -> f64

Source

pub fn get_bands(&self) -> i32

Source

pub fn get_page_height(&self) -> i32

Source

pub fn get_n_pages(&self) -> i32

Source

pub fn get_coding(&self) -> Result<Coding>

Source

pub fn get_format(&self) -> Result<BandFormat>

Source

pub fn guess_format(&self) -> Result<BandFormat>

Source

pub fn get_interpretation(&self) -> Result<Interpretation>

Source

pub fn guess_interpretation(&self) -> Result<Interpretation>

Source

pub fn image_set_delete_on_close(&mut self, flag: bool)

Source

pub fn image_invalidate_all(&self)

Source

pub fn image_minimise_all(&self)

Source

pub fn image_iskilled(&self) -> bool

Source

pub fn image_isMSBfirst(&self) -> bool

Source

pub fn image_isfile(&self) -> bool

Source

pub fn image_ispartial(&self) -> bool

Source

pub fn image_hasalpha(&self) -> bool

Source

pub fn image_set_kill(&self, flag: bool)

Source

pub fn image_set_progress(&self, flag: bool)

Source

pub fn image_write(&self) -> Result<VipsImage>

Source

pub fn image_pio_input(&mut self) -> Result<()>

Source

pub fn image_pio_output(&mut self) -> Result<()>

Source

pub fn image_inplace(&self) -> Result<()>

Source

pub fn image_write_to_file(&self, filename: &str) -> Result<()>

Source

pub fn image_write_prepare(&self) -> Result<()>

Source

pub fn image_write_to_buffer(&self, suffix: &str) -> Result<Vec<u8>>

Source

pub fn image_write_to_memory(&self) -> Vec<u8>

Source

pub fn image_decode_predict(&self) -> Result<(i32, BandFormat)>

Source

pub fn image_decode(&self) -> Result<VipsImage>

Source

pub fn image_encode(&self, coding: Coding) -> Result<VipsImage>

Trait Implementations§

Source§

impl Clone for VipsImage

Source§

fn clone(&self) -> VipsImage

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for VipsImage

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Drop for VipsImage

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.