Skip to content

Commit 4b4d3ca

Browse files
committed
CXAM is always 255
1 parent 3bc470e commit 4b4d3ca

File tree

2 files changed

+5
-10
lines changed

2 files changed

+5
-10
lines changed

bin/src/utils/paa/inspect.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ pub fn inspect(mut file: File, format: &TableFormat) -> Result<(), Error> {
3939
let paa = hemtt_paa::Paa::read(&mut file)?;
4040
println!("PAA");
4141
println!(" - Format: {}", paa.format());
42+
println!(" - Tags:");
43+
for tag in paa.taggs() {
44+
println!(" - {} = {:?}", tag.0, tag.1);
45+
}
4246
let maps = paa.maps();
4347
println!("Maps: {}", maps.len());
4448
let data = maps

libs/paa/src/paa.rs

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -189,16 +189,7 @@ impl Paa {
189189
}
190190
// - Max
191191
{
192-
let max_color = rgba_image
193-
.pixels()
194-
.map(|p| p.0)
195-
.fold([0, 0, 0, 0], |mut acc, p| {
196-
acc[0] = acc[0].max(p[0]);
197-
acc[1] = acc[1].max(p[1]);
198-
acc[2] = acc[2].max(p[2]);
199-
acc[3] = acc[3].max(p[3]);
200-
acc
201-
});
192+
let max_color: [u8; 4] = [255,255,255,255]; // always this value for some reason
202193
paa.taggs.insert(
203194
"CXAM".to_string(),
204195
vec![max_color[0], max_color[1], max_color[2], max_color[3]],

0 commit comments

Comments
 (0)