read_jpeg
Mojo function 🡭
read_jpeg
fn def read_jpeg(path: String) -> CanvasRead a JPEG file into an opaque Canvas. See the module docstring for what is and is not supported.
Args:
- path (
String): File path to read.
Returns:
Canvas: The decoded image as a Canvas, every pixel opaque.
Raises:
Error: path can’t be read, isn’t a JPEG, uses an unsupported
process (progressive, lossless, arithmetic, 12-bit, CMYK),
or is malformed.