feat: Added stuff
Some checks failed
build / checks-matrix (push) Has been cancelled
build / codecov (push) Has been cancelled
docs / docs (push) Has been cancelled
build / checks-build (push) Has been cancelled

This commit is contained in:
uttarayan21
2025-11-19 17:01:14 +05:30
parent 29674df85e
commit f41625e0ed
10 changed files with 271 additions and 151 deletions

View File

@@ -13,6 +13,17 @@ pub struct BlurHash {
punch: f32,
}
impl core::fmt::Debug for BlurHash {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
f.debug_struct("BlurHash")
.field("hash", &self.hash)
.field("width", &self.width)
.field("height", &self.height)
.field("punch", &self.punch)
.finish()
}
}
impl BlurHash {
pub fn recompute(&mut self, width: u32, height: u32, punch: f32) {
let pixels = blurhash::decode(&self.hash, width, height, punch)