15 lines
487 B
Swift
15 lines
487 B
Swift
import Foundation
|
|
|
|
enum ImageProcessing {
|
|
static let queue = {
|
|
let q = OperationQueue()
|
|
q.name = "thumbnail.processing"
|
|
q.qualityOfService = .userInitiated
|
|
q.maxConcurrentOperationCount = ProcessInfo.processInfo.activeProcessorCount * 2
|
|
return q
|
|
}()
|
|
static let cancelledResult = Result<[String: Int64]?, any Error>.success(nil)
|
|
// Impeller shrinks each side to the GPU texture limit on its own, which squishes long images.
|
|
static let maxPixelSize = 16384
|
|
}
|