pub(crate) fn load(
src_path: &str,
source_file: &Path,
call_span: &SourceSpan,
) -> Result<(PathBuf, DecodedImage), Box<Diagnostic>>Expand description
Resolve src_path (as written in the source) relative to source_file
(the .mos file currently being lowered), then read + decode it.
Returns Err(Diagnostic) on I/O or decode failure; the resolver
surfaces these to the user without aborting the rest of the
document so a broken #image(...) still produces a partial PDF.