pub struct AnalysisReport {
pub width: u32,
pub height: u32,
pub total_pixels: usize,
pub non_transparent_pixels: usize,
pub transparency_percentage: f32,
pub pixel_histogram: PixelHistogram,
pub regions: Vec<Region>,
pub text_areas: Vec<TextArea>,
pub dominant_color: [u8; 4],
pub contrast_ratio: f32,
}Expand description
Detailed analysis report for a rendered frame
Fields§
§width: u32Frame width in pixels
height: u32Frame height in pixels
total_pixels: usizeTotal number of pixels in the frame
non_transparent_pixels: usizeNumber of non-transparent pixels
transparency_percentage: f32Percentage of transparent pixels
pixel_histogram: PixelHistogramHistogram of pixel color distribution
regions: Vec<Region>Detected regions in the frame
text_areas: Vec<TextArea>Detected text areas in the frame
dominant_color: [u8; 4]Dominant color in the frame [R, G, B, A]
contrast_ratio: f32Estimated contrast ratio
Implementations§
Source§impl AnalysisReport
impl AnalysisReport
pub fn print_summary(&self)
pub fn to_json(&self) -> String
Trait Implementations§
Source§impl Clone for AnalysisReport
impl Clone for AnalysisReport
Source§fn clone(&self) -> AnalysisReport
fn clone(&self) -> AnalysisReport
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for AnalysisReport
impl RefUnwindSafe for AnalysisReport
impl Send for AnalysisReport
impl Sync for AnalysisReport
impl Unpin for AnalysisReport
impl UnsafeUnpin for AnalysisReport
impl UnwindSafe for AnalysisReport
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more