Skip to main content

load_and_validate

Function load_and_validate 

Source
pub fn load_and_validate(path: &Path) -> Result<ImageBuffer, ValidationError>
Expand description

Loads a container image from disk and runs it through every validation gate.

This is the only public entry point of the type-state, and the only way for any caller to obtain an ImageBuffer.

ยงErrors

Returns a ValidationError if the file cannot be read, is not a PNG, decodes to an unsupported pixel layout, is smaller than 2000x2000, or shows traces of previous JPEG compression.