8 stable releases
2.0.0 | Mar 14, 2023 |
---|---|
1.4.1 | Aug 4, 2022 |
1.4.0 | Mar 9, 2022 |
1.3.0 | Dec 13, 2021 |
0.1.0 | Dec 3, 2021 |
#316 in Date and time
31 downloads per month
27KB
484 lines
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,
..Default::default()
};
let mut browser = AdsbxBrowser::new((800, 600))?;
let screenshot = browser.screenshot(&config)?;
// screenshot.data 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, &screenshot.data).unwrap();
Dependencies
~8–20MB
~311K SLoC