feat(图像处理): 修正图像压缩密度与比例
build.yaml / build (push) Successful in 3m7s

This commit is contained in:
xiaoqidun committed 2026-10-11 19:21:57 +08:00
1 parent 478c18cb1f
commit e5f34c6ea6
4 files changed
+44 -40

No files matched your search

+1 -1
View File
@@ -157,7 +157,7 @@ func tiffCompressionDensity(data []byte, layout tiffImageLayout) (rasterDensity,
}
density = rasterDensity{x: float64(x[0]) / float64(x[1]) * factor, y: float64(y[0]) / float64(y[1]) * factor, unit: 1}
}
if math.Round(density.x) < 1 || math.Round(density.y) < 1 || math.Round(density.x) > math.MaxUint32 || math.Round(density.y) > math.MaxUint32 {
if math.Round(density.x) < 1 || math.Round(density.y) < 1 || math.Round(density.x) > math.MaxInt32 || math.Round(density.y) > math.MaxInt32 {
return density, false
}
if layout.orientation >= 5 {