Crate adsbx_screenshot

source ·
Expand description

Tools for taking screenshots of the ADS-B Exchange map.

use adsbx_screenshot::{AdsbxBrowser, AdsbxBrowserOptions, HistoryOptions};
use chrono::prelude::*;

let config = AdsbxBrowserOptions {
    regs: vec!["N822LA".to_string()],
    history: Some(HistoryOptions::EntireDay(Utc.ymd(2021, 12, 3))),
    zoom: 13.0,
    delete_ads: true,
    show_track_labels: true,
    hide_infoblock: false,

let mut browser = AdsbxBrowser::new((800, 600))?;
let screenshot = browser.screenshot(&config)?;
// is a Vec<u8> containing the PNG data
let mut file = std::fs::File::create("screenshot.jpg").unwrap();
std::io::Write::write_all(&mut file, &;