From 081f49a52a9636040806dfd401da39d72255c28b Mon Sep 17 00:00:00 2001
From: mehbark <terezi@pyrope.net>
Date: Tue, 11 Mar 2025 00:39:40 -0400
Subject: [PATCH] fix: unvertiflip

---
 src/main.rs | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/main.rs b/src/main.rs
index 277a145..91dc952 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -68,7 +68,9 @@ fn main() {
 
     #[allow(clippy::cast_possible_truncation, clippy::cast_sign_loss)]
     let img = ImageBuffer::from_fn(width.into(), height.into(), |x, y| {
-        let (x, y) = pos_to_sample(x as u16, y as u16);
+        // unvertiflip
+        let y: u16 = height - y as u16;
+        let (x, y) = pos_to_sample(x as u16, y);
         let i = f(x, y);
         let scaled = i / (max - min);
         // cube rooting makes things sharper