Skip to main content

build_image_attributes

Function build_image_attributes 

Source
fn build_image_attributes(
    args: &[SetArg],
    span: &SourceSpan,
    source_file: &Path,
    em_pt: f64,
    diagnostics: &mut Vec<Diagnostic>,
) -> Option<(AttrMap, Option<String>)>
Expand description

Walk a directive’s argument list and produce the attribute map for an [NodeKind::Image] node, including the decoded pixel buffer. Returns None (and emits diagnostics) if the path argument is missing or the bytes can’t be decoded – the caller drops the node in that case rather than emitting a half-built image.