Struct libvips::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_orientation(&self) -> i32

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> 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,

§

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>,

§

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>,

§

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.