diff --git a/Cargo.lock b/Cargo.lock index 6943ca8..94be4ca 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -699,6 +699,6 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "xml-rs" -version = "0.8.4" +version = "0.8.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2d7d3948613f75c98fd9328cfdcc45acc4d360655289d0a7d4ec931392200a3" +checksum = "52839dc911083a8ef63efa4d039d1f58b5e409f923e44c80828f206f66e5541c" diff --git a/src/view/resource.rs b/src/view/resource.rs index bd0711f..6d80819 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)