Struct leptonica_plumbing::Pix
source · pub struct Pix(_);
Expand description
Wrapper around Leptonica’s Pix
structure
Implementations§
source§impl Pix
impl Pix
sourcepub unsafe fn new_from_pointer(ptr: *mut Pix) -> Self
pub unsafe fn new_from_pointer(ptr: *mut Pix) -> Self
Create a new instance from a pointer
Safety
The pointer must be to a valid Pix
struct.
The structure must not be mutated or freed outside of the Rust code whilst this instance exists.
sourcepub fn read(filename: &CStr) -> Result<RefCountedExclusive<Self>, PixReadError>
pub fn read(filename: &CStr) -> Result<RefCountedExclusive<Self>, PixReadError>
Wrapper for pixRead
Read an image from a filename
sourcepub fn read_mem(
img: &[u8]
) -> Result<RefCountedExclusive<Self>, PixReadMemError>
pub fn read_mem( img: &[u8] ) -> Result<RefCountedExclusive<Self>, PixReadMemError>
Wrapper for pixReadMem
Read an image from memory
sourcepub fn get_height(&self) -> l_int32
pub fn get_height(&self) -> l_int32
Wrapper for pixGetHeight
sourcepub fn get_width(&self) -> l_int32
pub fn get_width(&self) -> l_int32
Wrapper for pixGetWidth
Trait Implementations§
source§impl LeptonicaClone for Pix
impl LeptonicaClone for Pix
Auto Trait Implementations§
impl RefUnwindSafe for Pix
impl !Send for Pix
impl !Sync for Pix
impl Unpin for Pix
impl UnwindSafe for Pix
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more