fix: ICC profile losing during media compression issue
This commit is contained in:
parent
c21b6e6a89
commit
16365d5d09
|
@ -87,8 +87,11 @@ extension ItemProviderLoader {
|
|||
return (utType as String) == UTType.png.identifier
|
||||
}()
|
||||
|
||||
let sourceProperties = CGImageSourceCopyPropertiesAtIndex(source, 0, nil) as NSDictionary?
|
||||
let destinationProperties = [
|
||||
kCGImageDestinationLossyCompressionQuality: isPNG ? 1.0 : 0.75
|
||||
kCGImageDestinationLossyCompressionQuality: isPNG ? 1.0 : 0.75,
|
||||
kCGImagePropertyProfileName: sourceProperties?[kCGImagePropertyProfileName],
|
||||
kCGImagePropertyColorModel: sourceProperties?[kCGImagePropertyColorModel]
|
||||
] as CFDictionary
|
||||
|
||||
CGImageDestinationAddImage(imageDestination, cgImage, destinationProperties)
|
||||
|
|
Loading…
Reference in New Issue