fix: unvertiflip
This commit is contained in:
parent
5d977ae028
commit
081f49a52a
1 changed files with 3 additions and 1 deletions
|
@ -68,7 +68,9 @@ fn main() {
|
||||||
|
|
||||||
#[allow(clippy::cast_possible_truncation, clippy::cast_sign_loss)]
|
#[allow(clippy::cast_possible_truncation, clippy::cast_sign_loss)]
|
||||||
let img = ImageBuffer::from_fn(width.into(), height.into(), |x, y| {
|
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 i = f(x, y);
|
||||||
let scaled = i / (max - min);
|
let scaled = i / (max - min);
|
||||||
// cube rooting makes things sharper
|
// cube rooting makes things sharper
|
||||||
|
|
Loading…
Reference in a new issue