06/22 Fix Medium impact items
This commit is contained in:
@@ -38,7 +38,8 @@ private let kImgJPEGQuality: CGFloat = 0.55
|
||||
/// kImgJPEGQuality, returning a fresh UIImage built from the compressed
|
||||
/// bytes. Applied to every photo before it's embedded in the PDF — this is
|
||||
/// the main lever for keeping file size minimal.
|
||||
private func compress(_ image: UIImage) -> UIImage? {
|
||||
/// nonisolated: called from inside a TaskGroup (concurrent), not @MainActor.
|
||||
private nonisolated func compress(_ image: UIImage) -> UIImage? {
|
||||
let size = image.size
|
||||
guard size.width > 0, size.height > 0 else { return nil }
|
||||
let scale = min(kImgMaxPx / size.width, kImgMaxPx / size.height, 1.0)
|
||||
|
||||
Reference in New Issue
Block a user