From 375d87a9b0ec1cf2fffd705adb870c86144d2400 Mon Sep 17 00:00:00 2001 From: Johannes Hofmann Date: Mon, 26 Oct 2026 20:05:20 +0100 Subject: Replace the C++ implementation with the Rust port The Rust port (formerly gipfel-rs) is now the official successor to the FLTK/GSL C++ code base. This squashes the port into a single commit and removes the C++ sources (they remain in the git history below). Layout: crates/gipfel-core headless core: hills, panorama geometry, projections (maxima-generated derivatives), pure-Rust LM fit, gipfel: JPEG comment + EXIF I/O, profiles, stitching crates/gipfel-cli command-line tools (export, info, stitch, profiles) crates/gipfel-app Cosmic DE (libcosmic) GUI, binary name `gipfel` codegen/ maxima scripts + regen.sh for the projection code tests/ golden files + C++ reference harnesses (historical) The original README is kept for now; it will be updated to describe the Rust build. gipfel.dat, AUTHORS, ChangeLog and NEWS are unchanged. --- crates/gipfel-core/examples/genjpg.rs | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 crates/gipfel-core/examples/genjpg.rs (limited to 'crates/gipfel-core/examples') diff --git a/crates/gipfel-core/examples/genjpg.rs b/crates/gipfel-core/examples/genjpg.rs new file mode 100644 index 0000000..ae12b94 --- /dev/null +++ b/crates/gipfel-core/examples/genjpg.rs @@ -0,0 +1,24 @@ +// creates a test JPEG with a gipfel comment: genjpg +use gipfel_core::metadata::ImageMetaData; + +fn main() { + let out = std::env::args().nth(1).unwrap(); + let (w, h) = (1600u32, 900u32); + let img = image::DynamicImage::new_rgb8(w, h).grayscale(); + img.save(&out).unwrap(); + + let mut md = ImageMetaData::new(); + md.longitude = 11.15; + md.latitude = 47.36; + md.height = 2100.0; + md.direction = 20.0; + md.pitch = 0.0; + md.roll = 1.0; + md.focal_length_35mm = 35.0; + md.projection_type = 0; + md.k0 = 0.0; + md.k1 = 0.0; + md.x0 = 0.0; + md.save_image(&out, &out).unwrap(); + println!("wrote {}", out); +} -- cgit v1.2.3