diff --git a/app/build/outputs/apk/release/app-release.apk b/app/build/outputs/apk/release/app-release.apk index ad39e05..57db9d0 100644 Binary files a/app/build/outputs/apk/release/app-release.apk and b/app/build/outputs/apk/release/app-release.apk differ diff --git a/app/src/main/java/com/inspection/camera/util/ImageProcessor.kt b/app/src/main/java/com/inspection/camera/util/ImageProcessor.kt index 4987063..875f630 100644 --- a/app/src/main/java/com/inspection/camera/util/ImageProcessor.kt +++ b/app/src/main/java/com/inspection/camera/util/ImageProcessor.kt @@ -232,7 +232,6 @@ object ImageProcessor { val rows = layoutType.rows val cellSpacing = 16 - val maxCellDimension = 800 // 根据第一张图片的原始尺寸确定单元格宽高比 val firstBitmap = images.firstOrNull()?.let { tryLoadBitmap(context, it) } @@ -242,17 +241,11 @@ object ImageProcessor { Pair(1, 1) } - // 基准单元格大小(限制不超过maxCellDimension) - val longer = maxOf(srcW, srcH) - val baseScale = if (longer > maxCellDimension) maxCellDimension.toFloat() / longer else 1.0f - val baseCellWidth = (srcW * baseScale).toInt() - val baseCellHeight = (srcH * baseScale).toInt() + // 原图尺寸 × 质量缩放因子 + val cellWidth = (srcW * quality.scaleFactor).toInt().coerceAtLeast(1) + val cellHeight = (srcH * quality.scaleFactor).toInt().coerceAtLeast(1) - // 根据质量等级缩放 - val cellWidth = (baseCellWidth * quality.scaleFactor).toInt().coerceAtLeast(1) - val cellHeight = (baseCellHeight * quality.scaleFactor).toInt().coerceAtLeast(1) - - val outputWidth = (cellWidth * cols + cellSpacing * (cols + 1)).coerceAtLeast(480) + val outputWidth = cellWidth * cols + cellSpacing * (cols + 1) // 底部文字区域高度 - 动态计算 val textAreaHeight = if (bottomTitle.isNotBlank() || bottomContent.isNotBlank()) {