pub fn imread(path: impl AsRef<Path>) -> Result<Tensor, ImgProcError>Expand description
Read an image file as ImageU8. Supports PNG, JPEG, BMP, GIF, TIFF, WebP.
Read an image from disk and return it as a [H, W, C] f32 tensor with values in [0, 1].
Supported formats: PNG, JPEG, BMP, WebP.
RGB images produce shape [H, W, 3], grayscale images are converted to RGB.
Accepts any path-like type (&str, String, &Path, PathBuf, etc.).