diff --git a/src/view/resource.rs b/src/view/resource.rs index 0d2d322..cd8e501 100644 --- a/src/view/resource.rs +++ b/src/view/resource.rs @@ -150,11 +150,13 @@ impl ViewResource { h * scale, )?; + writeln!(out, "")?; + for (i, rgba) in pixels.iter().cloned().enumerate().filter(|(_, c)| c.a > 0) { let rgb: Rgb8 = rgba.into(); let x = (i as u32 % w) * scale; - let y = (i as u32 / h) * scale; + let y = (i as u32 / w) * scale; writeln!( out, @@ -163,6 +165,7 @@ impl ViewResource { )?; } + writeln!(out, "")?; writeln!(out, "")?; Ok((w * h * scale) as usize)