pub enum ImageInput {
FilePath(PathBuf),
Buffer(ImageBuffer<Rgba<u8>, Vec<u8>>),
Dynamic(DynamicImage),
}
Expand description
Input source for OCR processing.
Variants§
FilePath(PathBuf)
Process an image from a file path.
Buffer(ImageBuffer<Rgba<u8>, Vec<u8>>)
Process an image from an in-memory buffer. The buffer should contain RGBA pixel data.
Dynamic(DynamicImage)
Process a dynamic image.
Trait Implementations§
Source§impl Debug for ImageInput
impl Debug for ImageInput
Source§impl From<&Path> for ImageInput
impl From<&Path> for ImageInput
Source§impl From<DynamicImage> for ImageInput
impl From<DynamicImage> for ImageInput
Source§fn from(image: DynamicImage) -> Self
fn from(image: DynamicImage) -> Self
Converts to this type from the input type.
Source§impl From<ImageBuffer<Rgba<u8>, Vec<u8>>> for ImageInput
impl From<ImageBuffer<Rgba<u8>, Vec<u8>>> for ImageInput
Auto Trait Implementations§
impl Freeze for ImageInput
impl RefUnwindSafe for ImageInput
impl Send for ImageInput
impl Sync for ImageInput
impl Unpin for ImageInput
impl UnwindSafe for ImageInput
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more