pub struct Image { /* private fields */ }Expand description
Immutable decoded image in [height, width, channels] tensor order.
Accepted channels are U8, U16, F16, F32, F64, or F128. Float samples are
finite but may exceed [0, 1] for high dynamic range processing. Encoding,
color conversion, capture, and display belong to explicit host adapters.
Implementations§
Source§impl Image
impl Image
Sourcepub fn new(format: ImageFormat, pixels: Tensor) -> Result<Self, DataError>
pub fn new(format: ImageFormat, pixels: Tensor) -> Result<Self, DataError>
Validates the format and nonempty decoded pixel layout.
§Errors
Rejects incompatible types, zero dimensions, and wrong rank/channel count.
Sourcepub fn format(&self) -> ImageFormat
pub fn format(&self) -> ImageFormat
Ordered pixel-channel interpretation.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Image
impl<'de> Deserialize<'de> for Image
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Image
Auto Trait Implementations§
impl Freeze for Image
impl RefUnwindSafe for Image
impl Send for Image
impl Sync for Image
impl Unpin for Image
impl UnsafeUnpin for Image
impl UnwindSafe for Image
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