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