Now psb as_i64 support float. Fix some re encoding image not works

This commit is contained in:
2025-12-25 16:17:37 +08:00
parent 5af17cee87
commit 110e15e7b2

View File

@@ -239,7 +239,9 @@ impl PsbValueFixed {
match self {
PsbValueFixed::Number(n) => match n {
PsbNumber::Integer(n) => Some(*n),
_ => None,
PsbNumber::Double(n) if n.fract() == 0.0 => Some(*n as i64),
PsbNumber::Float(n) if n.fract() == 0.0 => Some(*n as i64),
_ => None
},
_ => None,
}