Function image_colors::fetch_colors [] [src]

pub fn fetch_colors(filepath: &Path, depth: usize) -> ColorCounts

Returns a ColorCounts pixel to count vector for a file

Arguments

  • 'filename' - A String reference to the filename of the picture
  • 'depth' - How many pixels from the image to ingest

Example

let _colors = image_colors::fetch_colors(&Path::new("path/to/file.jpg"), 5);