Add Header::n_pixels()
This commit is contained in:
parent
f17d2b6201
commit
8f0a78a8c9
1 changed files with 4 additions and 0 deletions
|
@ -57,4 +57,8 @@ impl Header {
|
||||||
out.colorspace = v[13].into();
|
out.colorspace = v[13].into();
|
||||||
out
|
out
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub const fn n_pixels(&self) -> usize {
|
||||||
|
(self.width as usize).saturating_mul(self.height as usize)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue