pub mod data;
pub mod error;
pub mod parser;
pub mod pdf417;
pub use data::{
AamvaHeader, AamvaLicense, Compliance, Country, EyeColor, HairColor, Height, Sex,
SubfileDesignator, Truncation,
};
pub use error::AamvaError;
pub use parser::parse;
pub use pdf417::{decode_pdf417_from_image_bytes, decode_pdf417_from_luma8};
pub fn parse_license_from_image_bytes(image_bytes: &[u8]) -> Result<AamvaLicense, AamvaError> {
let text = decode_pdf417_from_image_bytes(image_bytes)?;
parse(text.as_bytes())
}
pub fn parse_license_from_luma8(
width: u32,
height: u32,
luma: Vec<u8>,
) -> Result<AamvaLicense, AamvaError> {
let text = decode_pdf417_from_luma8(width, height, luma)?;
parse(text.as_bytes())
}