environmentaltools.drone.create_preview
- environmentaltools.drone.create_preview(jpg_path: Path, text: str, size=(1920, 1080), waypoints_csv: Path | None = None, dpi: int = 96)[source]
Create a preview image with text overlay and optional waypoints map.
- Parameters:
jpg_path (Path) – Output path for the generated JPEG preview image.
text (str) – Text to display on the image (e.g., mission number).
size (tuple, optional) – Image size as (width, height) in pixels. Default is (1920, 1080).
waypoints_csv (Path, optional) – Path to CSV file with waypoints data for map overlay. Default is None.
dpi (int, optional) – Resolution in dots per inch for the output image. Default is 96.
- Returns:
Saves the preview image to the specified path.
- Return type:
None
- Raises:
RuntimeError – If Pillow is not installed and image creation is not possible.