image::Rgba is a tuple struct, you can access fields of a tuple struct using struct.0
syntax or more ergonomically through destructuring:
let png = image::open("src/heightmaps/ALPSMLC30_N050E014_DSM_8_BIT.png").unwrap();
for (_, _, image::Rgba(p)) in png.pixels() {
let [r, g, b, a] = p;
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…