From 4cc5663070da37e308de45cadd1af33ddb03c359 Mon Sep 17 00:00:00 2001 From: core Date: Fri, 3 Jan 2025 22:49:16 -0500 Subject: [PATCH] fix --- wxbox-tiler/src/sources/grib2.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/wxbox-tiler/src/sources/grib2.rs b/wxbox-tiler/src/sources/grib2.rs index b69ac41..07bb4e4 100644 --- a/wxbox-tiler/src/sources/grib2.rs +++ b/wxbox-tiler/src/sources/grib2.rs @@ -142,12 +142,12 @@ pub fn merge(base: Pixmap, data: Pixmap, settings: &TileRequestOptions) -> Pixma let ur = colorf64(upper.red); let ug = colorf64(upper.green); - let ub = colorf64(lower.blue); + let ub = colorf64(upper.blue); new.set(x, y, Color { - red: coloru8(lr + (lr - ur * a).abs()), - green: coloru8(lg + (lg - ug * a).abs()), - blue: coloru8(lb + (lb - ub * a).abs()), + red: coloru8(lr - (lr - ur) * a), + green: coloru8(lg - (lg - ug) * a), + blue: coloru8(lb - (lb - ub) * a), alpha: 255 }); } @@ -178,7 +178,7 @@ pub async fn source(path: actix_web::web::Path<(i32, u32, u32)>, req: Query, req: Query = vec![]; // borrow checker insanity