Procházet zdrojové kódy

Merge pull request #2396 from onevcat/fix/thumbnail-image-orientation

Fix ThumbnailImageDataProvider image orientation issue
Wei Wang před 8 měsíci
rodič
revize
84793a8fb5

+ 2 - 1
Sources/General/ImageSource/ImageDataProvider.swift

@@ -245,7 +245,8 @@ public struct ThumbnailImageDataProvider: ImageDataProvider {
                 
                 let options = [
                     kCGImageSourceThumbnailMaxPixelSize: maxPixelSize,
-                    kCGImageSourceCreateThumbnailFromImageAlways: alwaysCreateThumbnail
+                    kCGImageSourceCreateThumbnailFromImageAlways: alwaysCreateThumbnail,
+                    kCGImageSourceCreateThumbnailWithTransform: true
                 ]
                 
                 guard let thumbnailRef = CGImageSourceCreateThumbnailAtIndex(imageSource, 0, options as CFDictionary) else {